-->

29 December 2019

Asp.Net UpdatePanel Control

  Asp.Net CS By Example       29 December 2019

 UpdatePanel Control:  

 The UpdatePanel is the server-side AJAX framework of Microsoft.The UpdatePanel
control help we to update a portion of a page without updating the entire page.
It update only selected control portion update.

 Let’s see simple example of update panel Control. The Web Page contains a
ScriptManager Control and an UpdatePanel Control. The button control place inside
UpdatePanel Control. When we click click on button then only content contained in
the UpdatePanel control is updated not updating entire web page.
  Code: UpdatePanalEx01.aspx  
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdatePanalEx01.aspx.cs"
    Inherits="LearnAsp.Net.ControlDemo.UpdatePanal.UpdatePanalEx01" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        Page Time:
        <%= DateTime.Now.ToString("T") %>
        <br />
        <br />
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                UpdatePanel Time:
                <%= DateTime.Now.ToString("T") %>
                <br />
                <asp:Button ID="btn" Text="Update" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

  Output:  
logoblog

Thanks for reading Asp.Net UpdatePanel Control

Previous
« Prev Post

No comments:

Post a Comment

Please do not enter any spam link in the comment box.