A
Arthur Hsu
Hello,
I have an ASP.NET page with a form
<form id="myform" method="post" runat="server">
<aspanel id="pnl1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 8px" runat="server"
Height="572px" Width="360px">
<asp:button id="cmdSubmit" runat="server" Text="Submit"></asp:button>
</aspanel>
<aspanel id="pnl2" style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute;
TOP: 592px"
runat="server" Height="152px" Width="360px">
<asp:TextBox id="txt" runat="server"></asp:TextBox>
</aspanel>
On the code-behind C# file, I intercept the cmdSubmit.Click event:
private void cmdSubmit_Click(object sender, System.EventArgs e)
{
string s = txt.Text;
}
However, txt.Text always return "" no matter what I have input in the text
box. How can I fix that?
TIA,
Arthur
I have an ASP.NET page with a form
<form id="myform" method="post" runat="server">
<aspanel id="pnl1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 8px" runat="server"
Height="572px" Width="360px">
<asp:button id="cmdSubmit" runat="server" Text="Submit"></asp:button>
</aspanel>
<aspanel id="pnl2" style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute;
TOP: 592px"
runat="server" Height="152px" Width="360px">
<asp:TextBox id="txt" runat="server"></asp:TextBox>
</aspanel>
On the code-behind C# file, I intercept the cmdSubmit.Click event:
private void cmdSubmit_Click(object sender, System.EventArgs e)
{
string s = txt.Text;
}
However, txt.Text always return "" no matter what I have input in the text
box. How can I fix that?
TIA,
Arthur