我有 2 天最好的部分试图弄清楚如何相互“乘以 2 个下拉列表”并将其显示在标签中......
就像在数学中一样,当你把 2 个数字相乘时..
请帮助我...
欢迎所有建议
Protected void Button1_Click(object sender, EventArgs e)
{
int amount1 = int.parse(DropDownList1.selectedValue.ToString());
int amount2 = int.parse(DropDownList1.selectedValue.ToString());
Label.Text = amount1 * amount2;
}
我收到一个错误:
无法将类型“Int”隐式转换为“字符串”