|
Hi,
I have installed WoW slider on my ASP.NET project. I don't know why images now showing on the slideshow.
The source is like this when I view the page source:
<li><img src="~/media/members/a54cfa97-04f1-11e2-bd34-00ffceb1d3b5/posts/9eeccaf5-512a-11e2-a96e-00ffceb1d3b5/dc58c410-544f-11e2-a96e-00ffceb1d3b5.png" alt="" title="" width="906px" height="360px" id="9"/></li>
the image url is correct and I can see the image if I copy the above image url after adding the domain like http://localhost:50083
How can I fix this problem?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: src="~/media/members
I doubt if you can see '~' in page view source.
Based on what you say, it surely is relative path issue. Do a right click on the not displayed image and see the source - you will get the final URL being used and probably the issue.
Sounds like it is a relative path issue. This is one of the most common issue faced in a structured website.
There is a method exposed to handle URL's. Have a read: ResolveUrl[^].
I would suggest you to use this Tip and resolve the path correctly before setting the control/image source: Resolving Paths in a Multi-Folder WebSite[^]
Doing something like this can also help:
<img src='<%=ResolveUrl("~/Images/Progress.gif")%>' align="absmiddle" />
|
|
|
|