Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi...
I started working with URL routing today.. it works fine but i didn't see images in my application..images are in Images folder in my application.

Sample Code:

<img src="~/images/section_expanded.jpg" alt="Show/Hide section" />

but it doesn't work what i have to do please send me solution [Removed Urgency].
Posted
Updated 27-Jun-12 22:31pm
v2
Comments
Sandeep Mewara 28-Jun-12 4:32am    
Is there a small rectangle with cross?
Rajini.Y 28-Jun-12 4:34am    
yes it shows me a cross with in a rectangle box
Rajini.Y 28-Jun-12 5:15am    
Thank you for your quick response.....but it works with asp control
<asp:Image ID="img2" ImageUrl="~/Images/section_collapsed.jpg" runat="server" />

in this the list button images are also not displayed

1 solution

Sounds like it is relative path issue. At times, after deployment the path referenced as a source for images, stylesheets, etc is not correctly formed. This leads to no file found at the location referred because of which images don't download or style-sheets does not get applied.
You would need to make sure that the path is correct such that file is found and used.

I would suggest you to use this Tip and resolve the path correctly before setting the source of the file: Resolving Paths in a Multi-Folder WebSite[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900