Web Apps with C# - Events and Postback.
Mar12Written by:
2009/03/12 08:42 AM
Ok So now we are getting into the serious stuff. We started of with the most popular “Hello world”, application, then we got started on creating a web form, and understanding how that works to eventually create our HTML page. Now we sill be fiving into some more meaty stuff.
In this lesson we are going to look at how to handle events and set properties in code on the server. It is much the same as in many other languages, with the difference of mindset. Normally these settings take place on the client, in a windows application. But because the web is a disconnected application, the mindset has to change slightly when dealing with web apps. But if you understand events and properties in other languages, this will be no different.
We will also be talking about a concept called postback. We will also see how to determine if the current web request is as a result of postback or first time request. Why does that even matter? Why do we need to watch for it? How does it affect our code and the resultant web page?
This article is essential as a basic building block for C# programming. Don’t miss it. Browse to the blog post and read the entire article. You can find it at, Events and Postback, blog post.
Postbacks are very cool, because is gives the impression of a rich UI (User Interface). Many web sites out there are static HTML pages with links on them to many other static html pages. Postback enables us to interact with the user change what they see, give them new information, or even give them a different web page. Now to do this without asp.net would require a lot of custom java programming.
Sometimes postbacks can become confusing. When does it happen? What do I do about it? If we do not understand the basics of postback, we can get very confused and wonder why our web app is not behaving the way we expect it to behave.
In this article we cover all these aspects and hopefully give you a better understanding of postbacks and events.
Enjoy. Happy Programming
BTW, if you have any questions, you are most welcome to leave me a note.
blog comments powered by