Professional Documents
Culture Documents
Asp Net Aj
Asp Net Aj
Asp Net Aj
ScriptManager Class
<asp:ScriptManager ID="ScriptManager1" runat="server" />
The ScriptManager control is central to Microsoft ASP.NET 2.0 AJAX Extensions. The
control manages all ASP.NET AJAX resources on a page.
UpdatePanel
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btnSave" runat="server" Text="Save"/>
</ContentTemplate>
</asp:UpdatePanel>
UpdatePanel controls are a central part of Microsoft ASP.NET AJAX. They are used with
the ScriptManager control to enable partial-page rendering.
When partial-page rendering is enabled, a control can perform a postback that updates the
whole page or an asynchronous postback that updates the content of one or more
UpdatePanel controls.
There is a property Updatemode – that will control when an UpdatePanel need to be
updated. The values can be always or conditional.
Any new postbacks that are initiated while another postback is executing are canceled.
UPdateProgress
<asp:UpdateProgress ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel2" runat="server">
<ProgressTemplate>
UpdatePanel2 updating...
</ProgressTemplate>
</asp:UpdateProgress>
The UpdateProgress control helps you design a more intuitive UI when a Web page
contains one or more UpdatePanel controls for partial-page rendering. If a partial-page
update is slow, you can use the UpdateProgress control to provide visual feedback about
the status of the update.
Timer Control
<asp:UpdatePanel runat="server" id="UpdatePanel1"
UpdateMode="Conditional">
<contenttemplate>
<asp:Timer id="Timer1" runat="server" Interval="120000"
OnTick="Timer1_Tick" />
</contenttemplate>
</asp:UpdatePanel>
The Timer control performs postbacks at defined intervals. If you use the Timer control
with an UpdatePanel control, you can enable partial-page updates at a defined interval.
You can also use the Timer control to post the whole page.
Webservices
The Microsoft ASP.NET AJAX asynchronous communication layer enables a browser to
call Web service methods on the server by using ECMAScript (JavaScript). It exposes
APIs that JavaScript functions can use in any browser to call Web service methods on the
server.
C# Code
<%@ WebService Language="C#" Class="Samples.AspNet.ServerTime" %>
using System.Web.Script.Services;
namespace Samples.AspNet
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class ServerTime : System.Web.Services.WebService
{
[WebMethod]
public string GetServerTime()
{
return String.Format("The server time is {0}.",
DateTime.Now);
The ASP.NET AJAX Control Toolkit provides a set of sample controls and extenders that
makes it a snap to spice up your web site with rich functionality.
Accordion
AlwaysVisibleControl
Animation
AutoComplete
Calendar
CascadingDropDown
CollapsiblePanel
ConfirmButton
DragPanel
DropDown
DropShadow
DynamicPopulate
FilteredTextBox
HoverMenu
ListSearch (New!)
MaskedEdit
ModalPopup
MutuallyExclusiveCheckBox
NoBot
NumericUpDown
PagingBulletedList
PasswordStrength
PopupControl
Rating
ReorderList
ResizableControl
RoundedCorners
Slider
SlideShow (New!)
Tabs
TextBoxWatermark
ToggleButton
UpdatePanelAnimation
ValidatorCallout