Articles → ASP .NET AJAX → UpdateMode Property of UpdatePanel control in asp.net ajax

UpdateMode Property of UpdatePanel control in

asp.net ajax






Syntax


<asp:UpdatePanel ID=" "
            UpdateMode=" "
            runat="server">
</asp:UpdatePanel>









Example




<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager"
            runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1"
            UpdateMode="Always"
            runat="server">
            <ContentTemplate>
                <fieldset>
                    <legend>UpdatePanel content</legend>
                    <%=DateTime.Now.ToString() %>
                    <br />
                    <asp:Button ID="Button1"
                        Text="Refresh Panel"
                        runat="server" />
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>


        <asp:UpdatePanel ID="UpdatePanel2"
            UpdateMode="Conditional"
            runat="server">
            <ContentTemplate>
                <fieldset>
                    <legend>UpdatePanel content</legend>
                    <%=DateTime.Now.ToString() %>
                    <br />
                    <asp:Button ID="Button2"
                        Text="Refresh Panel"
                        runat="server" />
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>







Output



Click to Enlarge

Posted By  -  Karan Gupta
 
Posted On  -  Friday, August 31, 2018

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250