How to access content page controls from master page in asp.net

后端 未结 7 1048
一生所求
一生所求 2020-12-13 16:04

it is very easy to access master page control from content page like

protected void Page_Load(object sender, EventArgs e)
{
    // content page load event
          


        
7条回答
  •  遥遥无期
    2020-12-13 16:27

    Try this code

    Page.Master.FindControl("MainContent").FindControl("DivContainer_MyProfile").Visible = True
    

提交回复
热议问题