Home   Cover Cover Cover Cover
 

ASP.NET

Question: What are the major differences between ASP.NET and the older ASP technology?

Answer:

  • Object-orientation. Whereas the old ASP technology simply allowed the programmer to mix HTML text with dynamically generated parts, ASP.NET is object-oriented. The web page and all the GUI elements on it are objects that can be configured, react to user input events and render themselves to HTML. There is a large number of prefabricated GUI objects that can be used on ASP.NET pages and the programmer can even write his own GUI objects.


  • Event-driven model. ASP.NET pages are event-driven. Any user interaction such as a mouse click on a button raises an event that can be handled by the programmer. Thus programming ASP.NET web pages mainly requires the programmer to handle user input events, whereas generating the HTML that is sent back from the server to the client is completely taken care of by ASP.NET.


  • Code-behind files. In ASP.NET the layout of a web page and the program logic behind it can be implemented in separate files. This allows web designers and programmers to work on their own files without having to deal with issues that they do not want to be bothered with.


  • State management. When a web page is sent from the browser to the server and back again, the state of certain GUI elements (e.g. text boxes or check boxes) should remain unchanged. In ASP this has to be implemented by the programmer by writing the values of the old state into the GUI elements of the newly generated HTML stream. In ASP.NET the framework takes care of this. If the values of GUI elements are not explicitly changed by the programmer they remain unchanged.