-
Full Auto Achievement List Xbox 360
By geske1221Here is a list of Full Auto Achievements with descriptions…
-
New York Auto Show 2009 (best new cars)
By DriftKidThis article is about the new beasts introduced at the…
-
Ways to keep your auto insurance rates down
By MikeMcCarthySome tips regarding keeping your car or auto insurance costs…
-
5 Automotive Tools Every Auto Owner Needs
By CentraAutomobiles are sizeable investments. As a car becomes older, its…
-
Play Item
How to Treat Coughing in Dogs
in DogsThis video will focus on how to diagnose and the next course…
-
Play Item
How to Enlist the Help of a Travel Professional
in GeneralLearn how to enlist the help of a travel professional in this…
-
Play Item
Che Guevara - Profile
in GeneralIn this profile video learn about Che Guevara and his life in…
-
Play Item
Shaun Alexander Teaches How to Protect the Football - Running Tips From an NFL MVP
in FootballProtecting the football is not an easy task. NFL Pro,Shaun Alexander explains…
Learn about the Auto-Postback Source Code
More DIY videos at 5min.com
Video Summary:
Overview the Auto-Postback Source Code.
Video Tags:
auto-postback events, microsoft visual c, visual studio 2005, aspnet, Microsoft Windows, web development, total training
Source: Learn about the Auto-Postback Source Code
Video Transcript: (More)
So here, you can see there is extra hidden field called EVENTTARGET and EVENTARGUMENT and there is an extra client side script method that ASP.NET generated and returned to the browser. And this java script function is called “doPostback”. And every event that has an Auto-Postback property set to true, such as the NameTextBox, has an additional client side event called “onchange”. And it calls the java script function “doPostback”. And to doPostback function it takes two parameters. The first parameter identifies which control is generating the postback, and the second parameter is just an empty string actually, provides any additional information required by the event.
Okay. So what does this effectively saying is that when the user changes the text entry in that textbox, it will call the client site doPostback function specifying this textbox control name and then empty second parameter. So let us have look at the doPostback function.
The duo postback function takes the two parameters, the eventTarget, say for example, the name of the button or the textbox and the eventArgument which is an empty string and ultimately adds the information to the formed object and causes a submit; so very impressive. And remember you do not have to write any of the code here. This is generally to do automatically by ASP.NET. But you do get the benefit from it by having automatic postback capabilities as we found here.
Okay, so that really is the end of this lesson. So you have seen two examples in this lesson. The first example illustrated the page processing model. We talked about how controls get initialized and we saw how to do state mechanism enables ASP.NET to remember state changes between subsequent visits to the web page. Secondly, in this event demo example, we have seen how to handle events such as text change and selected index change and we have seen how the auto postback mechanism can be used to cause such events to happen automatically. So I hope that was all worthwhile and enjoyable. In the next lesson, we are going to have a look at validation.





No comments yet.