【发布时间】:2013-08-29 16:21:39
【问题描述】:
我正在使用 Microsoft Visual Web developer 2010。我有一个使用代码的文本框 (txtBoxInput):<input type="text" id="txtBoxInput"/>
我还有一个使用代码的 aspn.net 按钮 (btnTest):
<asp:Button ID="btnTest" runat="server" onclick="Button1_Click" Text="Button"/>
以及btnTest事件中的代码:
protected void Button1_Click(object sender, EventArgs e)
{
string test = txtBoxInput.Value = "test123";
}
但是没有检测到 txtBoxInput 控件。 有没有办法编写这个 C#/aspn.net 代码可以将此字符串(测试)放入 txtBox.Value。 谢谢
【问题讨论】:
标签: c# javascript asp.net button textbox