how to get label id of master page content form another page

Posted by Shanky11 under ASP.NET on 9/23/2013 | Points: 10 | Views : 1782 | Status : [Member] | Replies : 2
i am working on a ecommerece project
in that shopping cart
i need a label in master page and increae it from another page
how can i do this???




Responses

Posted by: Nismeh on: 9/23/2013 [Member] Starter | Points: 25

Up
0
Down
((Label)Master.FindControl("lblHeading")).Text = "your new text";

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 9/23/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer these links to access master page controls in content page
http://stackoverflow.com/questions/4979669/how-to-access-content-page-controls-from-master-page-in-asp-net
http://www.4guysfromrolla.com/articles/013107-1.aspx

For example,
Label lblCount = (Label )Master.FindControl("lblCounter");


EDIT:
http://dotnetstack.com/2011/07/11/master-page-events-in-content-pages-asp-net/
http://stackoverflow.com/questions/1569591/pass-masterpage-imagebutton-event-to-content-page

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response