How to set Page's Title from a web content page in ASP.NET 3.5

后端 未结 7 1487
长情又很酷
长情又很酷 2021-02-15 07:52

I\'ve read through quite a bit of posts/articles on how to do this and I still am not getting the page title set from the content page. My pages render OK except I can\'t get th

7条回答
  •  南旧
    南旧 (楼主)
    2021-02-15 08:30

    The problem is that the Page_Load method in the page runs before the Page_Load method in the user controls in the page, and a master page is actually a user control.

    You can use the Page_Init method in the master page instead.

提交回复
热议问题