Click here to Skip to main content
12,632,326 members (27,250 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET HTML
hi friends

i have a update panel in master page

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="cartnum" runat="server">0</asp:Label> Items
</ContentTemplate>

</asp:UpdatePanel>

i have to control this update panel from content page
how to do?
please help me
Posted 21-Nov-12 1:22am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi,

Create property of panel and expose them.

Or find the control with this.Master.
Label lbl = (Label)this.Master.FindControl("cartnum");
lbl.Text = "message";
  Permalink  
v3
Comments
sreerajsn123 21-Nov-12 7:01am
   
thanks a lot
Mohd. Mukhtar 21-Nov-12 7:05am
   
:-)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Write this code on content page;
Label l = (Label)Master.FindControl("cartnum") as Label;
                l.Text = "123";
  Permalink  
Comments
sreerajsn123 21-Nov-12 6:54am
   
after doing this code there is time difference that is some postback missing

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100