react-social-login

The easiest way to integrate Social Login in your React Apps ...Checkout NPM

Friday, September 3, 2010

Accesssing TextBox value in Init Event

As per ASP.net Page Lifecycle, Events that actually wire up Server Controls and load their viewstate, take place, quite after Init. However, one thing to remember is that even in Init Request object is available.

Hence, if you are aware of textbox control then you can access it using Request["textBoxName"].

Ideally you would use HTMLcontrol instead of ASP.net server control Like:

<input type="text" id="myTextbox" value="<%=SomeValueFromServerSide%>">

This textbox then can easily be accessed in Init using
var textBoxValue = Request["myTextBox"]

No comments :

Post a Comment

What are your thoughts on this post? Did you like it?