Click here to Skip to main content
15,917,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I can see all the.jpeg and .gif images when I execute site through my code, but after site deployment in Windows server, those images on web page is not been displayed.
I have given sourece as below..

For update progress..
XML
<asp:UpdateProgress ID="UpdateProgressMaster" runat="server">
        <ProgressTemplate>
            <panel>
            <img align="middle" src="/Images/ajax-loader_Wait.gif"  /></td>
            </panel>
        </ProgressTemplate>
    </asp:UpdateProgress>

For DIV

<div style="background-image: url('/Images/Main_Menubar.jpg');">

Is there any issue here. Any suggetions please.
Posted
Updated 16-Feb-11 18:06pm
v2
Comments
Sunasara Imdadhusen 17-Feb-11 0:08am    
Just try to check path after page is loaded successfully. (you can check image path using View Source).

My first guess would be that the images aren't in the right place.

My second guess would be that you need a tilde before the relative address to say it's relative to the root, but I believe that its only necessary (advisable?) when using <asp:image></asp:image> and the like and wouldn't affect standard tags.

My final guess would be that the initial forward slash is superfluous and may be causing problems, but I don't think it should.
Edit: Apparently not superfluous but could still be causing you problems. See Ankur\m/ 's answer
 
Share this answer
 
v4
What I usually do for such cases is check the link of the image and try to open it in another browser window/tab. If you are using Firefox, just right click on broken image link and select "Copy Image Location" or you may check out the page source as well. Open it in another window/tab and check if that works.


The link to an answer below from one of the article here in CodeProject explains it very well -
There is something about "Paths" for Asp.net beginners[^]

It says -
A leading / character essentially means that the subsequent path is relative to the root of the web server, while the lack of a leading / means that the subsequent path is relative to the current page's directory.


So according to your code, "Images" folder must be present in the root of the web server. Check the path.

Hope that helps!
 
Share this answer
 
This is one of the most common issue faced while using UpdateProgress and having structured website.

Surely, sounds like it has to be relative path issue only. I would suggest you to use this Tip and resolve the path correctly before setting the image source: Resolving Paths in a Multi-Folder WebSite[^]

Doing something like this can also help:
XML
<img src='<%=ResolveUrl("~/Images/Progress.gif")%>' align="absmiddle" />
 
Share this answer
 
SQL
Hi,

I have correct path mentioned and all the images that are required are in correct folder.


but not getting resolved..!
 
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