html选择控件获取选择值
select控件name="ds"
后台
protected void Button1_Click(object sender, EventArgs e)
{
//this.TextBox1.Text = Request.Form["ds"].ToString();
//this.TextBox2.Text = Request["ds"].ToString();
string cal = "";
foreach (string ele in Request.Form.AllKeys)
{
if (ele.Contains("sds"))
{
cal = Request[ele];
break;
}
}
this.TextBox2.Text = cal;
}
点击button1就可获取选择的值。