Define AJAX ,Controls of Ajax how to use Ajax in web application
Define AJAX ,Components of Ajax how to use Ajax:
In the past post we see more posts related to Introduction
of Asp.net grid view Control.,Example
of Templatefield in gridview .,Example
of DropDownList inside GridView,Check
box in ASP.NET GridView,Ckeck
box list example using javascript in grid.,Check
box in ASP.NET GridView,Show
grid view row details in to tooltip., How
to Bind Gridview Form database.,Show
gridview Row Details And Give Example.,Example
of Templatefield in asp.net gridview.,Example
of DropDownList inside GridView control,Introduction
of Asp.net grid view Control.,Example
of C# for Bind Data to asp.net Textbox inside gridview control,Bind
Data to asp.net textbox control in inside of gridview Using C# Example,How
to create master page in asp net c#,ASP
.NET Read a text file by C#,Create
Dynamic Rows in ASP.Net GridView Control with TextBoxes,Adding
Dynamic Rows in ASP.Net GridView Control with Textbox,Create
ASPX Page in ASP.Net and C#,Cookies,how
to make Cookies in asp.net with C#.
Define AJAX/What is Ajax?
AJAX stands for “Asynchronous JavaScript and XML”. It’s
basically a technique for creating Rich Internet Applications (RIA) that are
faster as well as more interactive, using a combination of commonly used
techniques as HTML/XHTML, CSS, Document Object Model (DOM), JavaScript,
XML/XSLT and XMLHttpRequest object.
XMLHttpRequest object is the key basis of AJAX and makes it
possible to communicate with the web server asynchronously and exchange data.
As compared to a traditional request which returns a complete web page, partial web page is returned as response to an
AJAX request.
What is ASP.NET AJAX?
Microsoft provided an implementation of AJAX functionality
known as ASP.NET AJAX.
As we discussed in above interview question that AJAX is a
combination of various techniques, so Microsoft simplified the usage of these
techniques with its own implementation. ASP.NET AJAX is a set of extensions to
ASP.NET and comes with reusable AJAX controls. Using ASP.NET AJAX, we can
develop applications that can update partial page instead of a complete page
refresh.
Difference between Synchronous and Asynchronous Postback?
In Synchronous postback, complete web page is sent to server
and in return rendering the output (i.e. complete page), whereas in case of
Asynchronous postback, partial page goes to the server and renders only partial
(required) part of the page.
What are the basic controls in ASP.NET AJAX?
Following controls can be considered as core AJAX controls
in ASP.NET.
- ScriptManager
- ScriptManagerProxy
- UpdatePanel
- UpdateProgress
- Timer
Later more controls are added to ASP.NET AJAX library e.g.
Script Loader, Client Data Context, Client Data Access, jQuery Integration etc.
For complete reference, look for AJAX Control Toolkit.
ScriptManager Vs ScriptManagerProxy?
As we understand that we can have only one ScriptManager
control on a page but we can have multiple ScriptManagerProxy controls.
Consider a scenario that we have ScriptManager in our
MasterPage that is available for all content pages. Now, we wanted to register
a web service in a particular page. So, we will not add another ScriptManager
to that page instead we will add ScriptManagerProxy to it in order to avoid
error.
What is the role of UpdatePanel in ASP.NET AJAX?
UpdatePanel is the control that facilitate the partial page
rendering functionality in an ASP.NET application. As discussed earlier that
using ASP.NET AJAX, we can communicate with a web server asynchronously and
update a part of a page without a complete page postback. In order to apply
partial page update/rendering, we can add one or more UpdatePanel controls to
our ASP.NET Page as follows:
<asp:ScriptManager ID=”ScriptManager1″
runat=”server”></asp:ScriptManager>
<asp:UpdatePanel ID=”UpdatePanel1″ runat=”server”>
<ContentTemplate>
<asp:Label ID=”lblPanel” runat=”server” Text=”Update Panel
Added.”></asp:Label><br />
<asp:Button ID=”btnTestButton”
runat=”server”
OnClick=”btnTestButton_Click”
Text=”Test Button”
/>
</ContentTemplate>
</asp:UpdatePanel>
Comments
Post a Comment