Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Have a label control in master page.Should get this control to content page's update panel.
The code in content page is 


C#
ModalPopupExtender popUp = (ModalPopupExtender)Master.FindControl("ModalPopupExtender1");
            HtmlGenericControl lblMessage = (HtmlGenericControl)Master.FindControl("InfoMesg");

            lblMessage.InnerText = "Invalid page number, Please enter valid page number.";
            popUp.Show();



When update panel is place the message in lblMessage is not being displayed.
Can someone please help me achieve this.


Thanks in advance.
Posted

1 solution

Better you do like this get the label control of the master page outside the content page update panel using

Label lblInfo = (Label)this.Page.Master.FindControl("labelID");

and then use that lblInfo inside the update panel

i.e lblinfo="XXXX";

I hope it ll work
 
Share this answer
 

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