hai, i am getting the images in my localhost.But when i am uploading my project the images ar开发者_Python百科e not displayed.
I am saving my images in "~/App_Themes/darkOrange/images/button_line.jpg".
Is their is another method for giving image path in ASP.Net.
please help. thank you.
Yes - check what is actually getting rendered out in the "src" attribute for the images. See if you can physically get to that file, if you cant, means the webpage cant. Have you confirmed the images have been deployed to the web server (not local - the server you uploaded to).
If not, make sure the "Build Action" for the images are set to "Content" in the properties window in Solution Explorer.
I faced a similar problem once. But, that was just a static website. Where the images were displayed in localhost but when I ftp files to the server, the images wouldn't show.
Later, I found out that it was becasue of the different case. For e.g - The image file name was "Image.JPG" and I had used "Image.jpg" in my code
Just check if this helps.
精彩评论