Asp net textbox value not updating on postback
I have written an article on how to use Ajax in ASP. Below Get Set Session Value method is used for both setting and getting the session value.
I love these controls but this behavior is a serious breaking change and makes no sense.Net control to send data from server to client side.We are using Hidden Field so that the data will not be visible to the user.For that, first let’s see the page life cycle on postback.Now lets first discuss about the View State, How View State works?We are setting the session value to textbox on successful completion of Ajax request.
<table> <tr> <td> Session Value of " Emp Name":</td> <td><asp: Text Box ID="txt Session Value" runat="server"></asp: Text Box></td> </tr> <tr> <td> <asp: Button ID="btn Get Session Value" runat="server" On Client Click="call Ajax Method(event)" Text=" Get Session Value" /> </td> <td> <asp: Button ID="btn Set Session Value" runat="server" On Client Click="call Ajax Method(event)" Text=" Set Session Value" /> </td> </tr> </table> You can use any server side ASP.
aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.
You can even enter the value and click “Set Session value” to set the session value. Below call Ajax Method will call the server side method using Ajax.
As this is a static method, we are using Http Context. We need to pass the Aspx file name and method name details to j Query Ajax function.