【发布时间】:2013-03-26 12:19:51
【问题描述】:
我基本上想合计金额。
金额存储在标签中。我想添加标签。基本上我想添加标签,但我不能,因为标签是.Text,即String,所以当我添加它时,我会得到一串添加的标签,而我希望添加存储在标签中的数字。这是我下面的代码。
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
{
temp4 = Int32.Parse(DropDownList3.Text);
temp5 = temp4 * 76;
Label7.Text = temp5.ToString();
}
点击按钮后,Label7 中的金额应与另一个标签一起添加。
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Label16.Text = Label7.Text+Label6.Text;
}
这样就可以查到总量了。
我对编程和它本身有点陌生,这是我项目的一部分,如果这个问题看起来很愚蠢,我很抱歉
【问题讨论】:
标签: c# asp.net string int label