Hi,
I am trying to convert my web application into a fully dynamic system. One thing I am trying to do is to load a different logo (set in the masterpage template) depending on the host.
But, even though the code is hit (in page_init), there is no image displayed on any page inheriting the masterpage - no image, no red x's, nothing.
My code looks like this (from masterpage, the path to the image is correct and pasted from Windows Explorer's property window path):
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
If Request.Url.Host.Contains("localhost") Then
Image1.ImageUrl = "C:\Users\firstname.lastname\Documents\Visual Studio 2008\WebSites\ecardsystem\images\ECard Platform.jpg."
End If
End Sub
I know that I can add the image on the fly using literal controls through codebehind, but this will mean I need to design the html too, by hand, when the design is all done and perfect. Thus this approach will create a bit more work.
Thanks