问题描述
嗨!
我有下载列表控件,其中包含asp.net C#中的主题。用户从下拉列表中选择主题说数学,然后在文本框中输入主题的标记。点击提交按钮将数据存储在数据库中,我想返回输入标记的总数说,我输入3个不同的标记我如何得到总数。
i尝试
Hi!
I have dropdownlist control that contain subjects in asp.net C# . The user selects the subject say maths, from the dropdownlist and then enter the mark for the subject in the textbox. Click on submit button to store the data in the database, i want to return the total of the entered marks say, i entered 3 different marks how do i get the total.
i tried
double total = Convert.ToDouble(TextBox95.Text);
total = Convert.ToInt32(TextBox93.Text) + Convert.ToInt32(TextBox93.Text)----
但是显示的总数db中输入的数字乘以公式中的(Convert.ToInt32(TextBox93.Text))数。它在数学上是有意义的但是如何使输入的值在存储在同一文本框中时显示不同?
谢谢
but the displayed total in db is the entered number multiplied by the number of (Convert.ToInt32(TextBox93.Text))in the formula. it makes sense mathematically but how do i make the entered values appear differently while stored in the same textbox?
thank you
推荐答案
这篇关于如何计算输入单个文本框的多个总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!