How to change part of page title inside inline user control? I know that I can run control at the head of the .aspx page, but I have an existing site with many pages that I don’t want to change. All they have in common is a menu. So, I decided that I could put the code there to change the title element of the containing page, but not the cube. The code I'm trying to implement looks like this, however, Page.Header is null.
Private Sub Page_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim favicon as new htmllink
favicon.Attributes.Add ("REL", "SHORTCUT ICON")
favicon.Attributes.Add ("HREF", "images / bh_favicon.ico")
Page.Header.Controls.Add (favicon)
End sub
I tried putting it in PreRender and Render events, but the same thing. The Page.Parent.Page.Header file is also null. Is there a better way to do what I want to do? I want to add an icon to a page group other than the default icon. Basically, I have two sites in one code base.
Please, this is my first post.
TIA
source
share