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 "_doPostBack".

Comments

Popular posts from this blog

jQuery Basics

What is the difference between a Page Layout and Master Page in SharePoint?

Accessing data from SharePoint 2010 to an ASP.NET application