protected void Button1_Click(object sender, EventArgs e)
{Control ctl = this.Parent;
String name = (ctl.Page.Master.FindControl("txtName") as TextBox).Text;
}
First find parent page then find Masterpage control of parent page.
protected void Button1_Click(object sender, EventArgs e)
{
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · ASP.NETASP.NET Tags in Web Forms: The Complete GuideDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.