Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I tried to add update panel for avoid page refresh in visual webpart,It worked in the local environment but not working in the server when i tried to deployed.

C#
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <fieldset style="width: 30%">
                <legend>Update Panel-1</legend>
                <asp:Label ID="lbl1" runat="server" ForeColor="green" /><br />
                <asp:Button ID="btnUpdate1" runat="server" Text="Update Both Panels" OnClick="btnUpdate1_Click" />
                <asp:Button ID="btnUpdate2" runat="server" Text="Update This Panel" OnClick="btnUpdate2_Click" />
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <fieldset style="width: 30%">
                <legend>Update Panel-2</legend>
                <asp:Label ID="lbl2" runat="server" ForeColor="red" />
            </fieldset>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnUpdate1" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
Posted
Updated 7-Jan-14 2:48am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900