If for example you have created a page in the root directory, say form1.aspx. Now you have created another page inside a folder (say for example _pages/Webform1.aspx. You have placed images inside a folder (say for example images present in _images folder), and used the images in form1.aspx using the tag. Now in case you have come across a situation where you want to do a Server.Transfer functionality from Webform1.aspx to form1.aspx (example, Server.Transfer("form1.aspx"). If you do so the images in form1.aspx will not get loaded. In order to overcome this issue you can do so using the following way..
Ans: Add the attribute runat="server" in the img tag.
Sample code: <img runat="server" src="your image path" />
Wednesday, September 8, 2010
Server.Transfer Image Path
Labels: .net
Saturday, May 8, 2010
Subscribe to:
Posts (Atom)