I have asp.net page (Form = runat server )
2 textboxes:
<input type="text" id="tb1" />
<asp:TextBox ID="tb2" runat="server" />
and a button submit.
However when I put some values in them – and press the button – Only tb2 is getting back its value from the server.
I thought that inputs fields values are going from client to server and back always !
in what event ( in page life cycle) Does tb1 lose its value ?
The POST will contain information entered in tb1 – so it can be read from the Request
if you change it to
it will work as you want.
without the runat=server it does not “lose” its value – it will never be populated – ever, because it is simply data in the POST and not connected to a server side control.
one final point – to explicitly answer some of your comments – the POST data is processed just before the PreLoad event – this can be found from http://msdn.microsoft.com/en-us/library/ms178472.aspx