c#如何用button使得textbox中数字的值增减
button和textbox都是动态生成的protectedvoidbtnPlus1_Click(objectsender,EventArgse){TextBoxtext...
button和textbox都是动态生成的
protected void btnPlus1_Click(object sender, EventArgs e)
{
TextBox textinput1 = (TextBox)tblGoods1.FindControl("txtinput1");
int n = int.Parse(textinput1.Text);
n = n + 1;
textinput1.Text = n.ToString();
} 展开
protected void btnPlus1_Click(object sender, EventArgs e)
{
TextBox textinput1 = (TextBox)tblGoods1.FindControl("txtinput1");
int n = int.Parse(textinput1.Text);
n = n + 1;
textinput1.Text = n.ToString();
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询