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

后端 未结 7 1439
长情又很酷
长情又很酷 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:50

    I was having this problem as well. I can't edit the master file (too many possible side effects), so I used the pages PreRender() method, which fires after the master pages Page_Load()

    protected void Page_PreRender(object sender, EventArgs e)
    {
        Page.Title = Page.Title + " - server error 500";
    }
    
    0 讨论(0)
提交回复
热议问题