Home | HTML | Asp.Net | HTML Probe | .Net Probe
  Contact Us |Sitemap

Ajax Extensions in Asp.Net

  Skip Navigation LinksHome>Asp Home>Ajax Controls
AJAX stands for Asynchronous JavaScript and XML. As its name suggests, it is a combination of JavaScript and XML languages and used on the client-side to create asynchronous web application. An AJAX web application can send data to server and receive data from server asynchronously.

ASP.NET AJAX programming consists two portions. One is client-side portion and the second is server-side portion. The client-side portion is a set of JavaScript libraries. The server-side portion of ASP.NET AJAX includes the controls and components that use the client-side JavaScript libraries.

The toolbox of the asp.net in visual studio contains a group of Ajax Extender as shown below:


The ScriptManager

The ScriptManager is the main part of the server-side ASP.NET AJAX control. This control is used for implementing the AJAX functionality in an Asp.Net Webpage. ScriptManager is required where AJAX control is used on the Webpage. There is no visual appearance of the ScriptManager on the Webpage. If there are several WebPages containing AJAX Control, then you can add ScriptManager on the Master Page instead of added on each page. You can use only one ScriptManager on a page. This control is also responsible for managing client script for AJAX enabled Website. You can simply drag and drop ScriptManager on the page OR write the following code snippet to add a ScriptManager on the page.



Some properties of ScriptManager control are given below :
  • AsyncPostBackTimeout:- Sets a time value in second for the asynchronous pastbacks timeout.

  • ScriptPath: It shows the type of script to load when more than one type is available.

  • EnablePageMethod: Sets a value that shows whether or not to call the page method from the client script. The default value is false.

  • EnablePartialRendering:- Sets a value to indicate whether or not to enable partial-page rendering.

  • Scripts:- It is the collections of script references that are merged on the runtime in asp.net page.

  • Services :- It is the collections of service references that are merged on the runtime in asp.net page.

The ScriptManagerProxy Control

The ScriptManagerProxy control is the alternative of ScriptManager. As we know that only one ScriptManager can be added on a page and if we add the ScriptManager on the Master Page, there is no need to add ScriptManager in the content page. But in this condition if a content page required another ScriptManager for other functionality, a developer can add a ScriptManagerProxy Control. So we can say that the ScriptManagerProxy control is used when a page already contains a ScriptManager Control and there is a need to add another ScriptManager for a nested or parent component.

The Timer Control

The Timer Control is used to update the content of a page after a specific interval. Basically the Timer Control is attached with the UpdatePanel control to perform the regular updates for the partial page after a predefine interval. A developer can add one or more than one control on a single webpage. This control is invisible at runtime just like ScriptManager control.

A sample code snippet for Timer Control is given below:-

<asp:Timer ID="Timer1" runat="server">


Some important properties of Timer Control are given below :
  • Interval:- It specify the desire time limit in milliseconds(1000 milliseconds in a single second). The Tick event is raised after the interval time limit is over.

  • Enabled :- It sets a value that indicates that the Timer Control fires the tick event or not.

The UpdatePanel Control:-

The UpdatePanel Control is used to divide Webpage into parts, where each part can be updated randomly. This control is invisible at runtime. This control can contain other web server control as Button Control, label control etc. In short we can say that UpdatePanel Control works as a container and perform partial-page rendering.

A sample code snippet for UpdatePanel Control is given below:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">


Some important properties of UpdatePanel control are given below :
  • Triggers:- It is a collection of all the triggers that are applied on the UpdatePanel control to be updated.

  • UpdateMode:- It indicate that when the UpdatePanel content will refress.

  • RenderMode:- It tells that the content of the UpdatePanel control is placed within the <div> tag(Block) or <span> tag(inline).

The UpdateProgress Control

The UpdateProgress Control is used to show the progress of the partial page contents in the UpdatePanel. This control is very useful when the speed of updating content is slow. Thus a user gets idea how much information is processed and how long a user has to wait.

Some important properties of UpdateProgress Control are given below :
  • AssociatedUpdatePanelID:- It sets the UpdatePanel Control ID, for which the UpdatePanel Control displays the progress status.

  • DisplayAfter:- It specify the value in millisecond after which the UpdateProgress Control is displayed.

  • DynamicLayout:- It determines whether the progress template is rendered dynamically.

  • ProgressTemplate:- It displays the content of the UpdateProgress control.
DMCA.com Protection Status
Design & Maintain By solvingera group| solvingera.com © 2013-2014 | all right reserved |Privacy Policy | Back to top