Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to access page control at master page
i have one label at page i want access this label at masterpage what i do
page_name=index.aspx
masterpage=master.mater
Posted
Comments
bhagirathimfs 1-May-12 6:39am    
Can you explain briefly.

Hi ,
Try this
C#
protected void Page_Load(object sender, EventArgs e)
{
   Label lbl = (Label)Master.FindControl("ContentPlaceHolder1").FindControl("Label1");
   string test = lbl.Text;
}

ASP.NET
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Label ID="Label1" runat="server" Text="yyyyyyyy"></asp:Label>
</asp:Content>


Best Regards
M.Mitwalli
 
Share this answer
 
I think you are searching for this..!

Click here for your solution..![^]
 
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