Posts

Showing posts from March, 2013

Explain the Auto Postback feature?

When ever the "AutoPostback" property of a control is set to "True", by default it is set to "False", the .NET Framework will insert couple of extra lines for the control when the HTML is rendered, the lines added are as follows: In the control where the Auto Postback propery has been set to True, a java script method will be added as "_doPostBack" which will take two arguments as "EventTarget" and the other as "EventArgument". The event target will be holding the name of the control and the event argument will be holding any additional data that needs to be passed. Two hidden variables would be added to the page, the first one would be "_EVENTTARGET" which holds the name of the control which has triggered the event and "_EVENTARGUMENT" which holds additional information needed by the server.  An "onchange" method is added to the control which actually makes a call to the method "_doPost...

What do you understand by "Postback"?

ASP.NET is a server-side and not a client-side technology, events that occur on a page are handled by code running on the server. For this to work, ASP.NET uses the mechanism of “Postback”. When an event is triggered, for instance a button is clicked; the page is submitted back to the server for processing, along with the information about the event and any pre-existing data on the page (via view state).