i have taken one mster page in my project. in that one image is there, that image is not displayed in other pages which are related to that master page.
i have tried to change image extension also but it didnt work.

Recommended Answers

All 12 Replies

Is the filepath to the image file correct?

Could you provide us with an extract of the code which isn't working?

file url is correct for master page. on master page is displaying image. but on the other pages image is not displayed. there is no such code for image.

If there's no code to put the image on the page then it won't show up.

<asp:Image ID="Image1" runat="server" Height="40px" ImageUrl="~/App_Data/actuallogo.JPG"
            Width="280px" />

this is simple code i have written in master page.

You will need to put that into every page you want the image displayed.

as per my knowledge, i think when we write any code in master page that will automaticaly reflect in other pages.
Pls see the following attchament which will give u idea wht i m trying so say.

What does the source show for where the image is? (When clicking view source on the loaded web page). It looks like it's trying to load the image but can't find it.

<img id="ctl00_Image1" src="App_Data/actuallogo.JPG" style="height:40px;width:280px;border-width:0px;" />

above code is in view source of loaded web page.

Is that filepath correct? It's pointing to the folder "App_Data" which it's assuming is in the same folder as the file. It seems to me that the filepath may be wrong.

i have already checked file path, ths is correct one

is this issue with image extension?

is this issue with image extension?

If the file extension is .jpg and your link ends with .jpg then it shouldn't be a problem. You could always try putting it in lower case although it shouldn't be case sensitive.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.