Home     |      Learn AJAX     |      Forum     |      Register     |      Submit Resource     |      Submit Article      |      Contact Us

Home AJAX-Tips
 

The Static Page Method in Ajax

 

Loading an application online is done through the reliable HTTP. Though this is a slow method, the definite process of loading the application is important for Ajax since HTTP sports a stateless feature. In ASP.Net HTTP is able to accept any feature of most web development application it could launch. For Ajax, it is the event driven applications that are very important in most Ajax based application are loaded in HTTP. ASP.Net conveniently provides the functions so that developers can easily load an event driven applications.


In order to load the event driven applications in HTTP, Page Method is usually invoked by developers. This is an almost unknown part of ASP.Net since it is automatically loaded. The code for Page Method looks like this:


public partial class _Default : System.Web.UI.Page


This code form ASP.Net automatically changes the feature of the webpage to have a Page Method background.


The beauty of using Page Method lies on its simplicity. The coding is very simple and with the use of ASP.Net as a framework, it easily launches the online application as a Page Method.


Another great feature of Page Method is its ability to persist the functions it has in a webpage. Page Method in itself does not have the POST functions as you can see clearly in its coding. Since it does not have the ability to POST for any data at all, it can easily accept different functions wherein they come with a POST for their data functions.


Instead of POST functions, developers have to use another function ViewState to grab information from the server. ViewState is a great alternate since it works just like POST but leaves more for other functions to work well. ViewState has enable Page Method to be very persistent.


The Page is basically reinstated without having to reload the whole webpage with the use of ViewState. You are assured with a well functioning page since aside from the POST functions in the webpage; developers can use the ViewState so that it will continuously load the function until it is implemented. It might be extra work but the application actually becomes lighter as it does not load Page Method together with different functions.


Because it does not go with the regular POST functions, Page Method offers what is called the “Static” page for developers. There are developers who uses a non-static type of page, referred to as an “instance” this program.


Instance relies on the overall interaction in the functions of the webpage. Although it has its advantage, the page loading could get slower since it attaches itself to additional functions. Static Page Method on the other hand does not rely on the functions and loads independently from different functions. This promotes the website to be a lot lighter compared to its popular counterpart.


The Static Page Method in Ajax is a very smart idea of transporting information. With heavier information at hand you will get all the help that you can to efficiently implement a good looking website. Its ability to persist ensures constant connection with the server, providing the updated information to the user faster and much more effective.



Read Next: How can Ajax get you into trouble with Google



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links