views:

60

answers:

2

i have 1 a.master page and 1 b.aspx with its b.aspx.vb page. I have the following property in the a.master.vb

Public Property Page_Title() As String
    Get
        Return title_div.InnerHtml
    End Get
    Set(ByVal value As String)
        title_div.InnerHtml = value
    End Set
End Property

in the b.aspx.vb page i have

DirectCast(Page.Master, a_am).Page_Title = "/images/img1.png"

but when i open the a.aspx page, it shows the text /images/img1.png and not the image. how do i make it show that image i want

+2  A: 

You've told it to make the InnerHtml just the string "/images/img1.png" - how did you expect that to be automatically translated into an image tag? Try this:

DirectCast(Page.Master, a_am).Page_Title = "<img src='/images/img1.png' />"

For the sake of accessibility etc you should really have some "alt" text etc, mind you...

Jon Skeet
A: 

You are adding html to the page, so you need to put valid html into the string:

DirectCast(Page.Master, a_am).Page_Title = "<img src='/images/img1.png' />"
Hogan