0
我想要在不使用“runat”属性的情况下点击html按钮时获取html文本框的值。我需要在代码后面执行它,是否有可能?当html按钮被点击时获取Html文本框的值
<button id="button1" onclick="btnclick">Click Here</button><input type="text" id="txtBox1" name="txtBox12" />
和我的代码后面是这样的:
protected void btnclick(object sender, EventArgs e)
{
string name = Request.Form["txtBox12"];
Response.Write(name);
}
但我想在后面 –
代码来执行代码,我说:要访问任何控制代码背后需要有RUNAT =服务器属性附加到它。 – Elis
thak你我会试试 –