Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Using Updatepanel in sharepoint 2013 web part

$
0
0

Hi Experts,

We are facing problem related to updatepanel in sharepoint 2013. we have a sample webpart that includs a label and a button, we want to write somthing to label in click event of button without refreshing the whole page. Our sample code is as followed :

 <asp:UpdatePanel runat="server" ID="UpdatePanel1">
        <ContentTemplate>
            <asp:Label ID="lbl" runat="server" Text="Loaded" Visible="true"></asp:Label>
            <asp:Button ID="btn" runat="server" OnClick="btn_Click"/>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btn" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

        protected void btn_Click(object sender, EventArgs e)
        {
            lbl.Text = "BUTTON CLICKED !";
            lbl.Visible = true;
        }

We have tried the solution mentioned on this link but could not achieve our goal.

Any solution for this problem along with sample code will be highly appreciated.

Thanks.


A Learner



Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>