For some reason, everything that I put in the text box is not saved. Can someone please tell me why this is happening? Here is the simplified code that I use:
.aspx
<body> <form id="form1" runat="server"> <div> Try this: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /> </div> </form> </body>
.aspx.cs
protected void Page_Load(object sender, EventArgs e) { TextBox1.Text = "Test 1"; } protected void Button1_Click(object sender, EventArgs e) { Response.Write(TextBox1.Text); }
Response.Write always acts like "Test 1" no matter what I put into it. Thank you for your help!
source share