In this article we will discuss about how to use updatepanel in asp.net. Also you can check my last article on Ajax Progress bar in Asp.Net. Also you can see some Ado.Net and SharePoint 2010 articles.
Normally we use updatepanel for partial page refreshing, means the code within that panel will not postback. Microsoft provides AJAX which helps us in doing so.
For this our .aspx page should contain one ScriptManager and can contain more than one updatepanel control. The code that we put inside the updatepanel will not do postback on click event. UpdatePanel and
ScriptManager are available in Toolbax under AJAX Extensions section.
Remember we need to put the scriptmanager control inside the form tag.
Below is the full HTML code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AjaxUpdatePanel.aspx.cs"
Normally we use updatepanel for partial page refreshing, means the code within that panel will not postback. Microsoft provides AJAX which helps us in doing so.
For this our .aspx page should contain one ScriptManager and can contain more than one updatepanel control. The code that we put inside the updatepanel will not do postback on click event. UpdatePanel and
ScriptManager are available in Toolbax under AJAX Extensions section.
Remember we need to put the scriptmanager control inside the form tag.
Below is the full HTML code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AjaxUpdatePanel.aspx.cs"
<!DOCTYPE html
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ajax updatepanel example in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btnAjaxNoRefresh" runat="server" Text="Click for no refresh !" OnClick="btnAjaxNoRefresh_Click" />
</ContentTemplate>
</asp:UpdatePanel>
<div>
</div>
</form>
</body>
</html>
0 on: "Ajax updatepanel example in asp.net"