Click here to Skip to main content
15,939,960 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi all...
i am try to load image when loading like this
Image1.ImageUrl="domain.com/httpdocs/admin/zestimg.jpg";
while watching in browser it returns exception like
404 file not found but image is there i uploaded as well as given read & write permissions also i tried in many ways like Server.MapPath("~/admin/zestimg.jpg"); and also in this way Server.MapPath("../admin/zestimg.jpg"); every time firebug software shows this exception file not found how can i give image address to image control please can any one help me Greatly Appreciate You
thanks in advance
Posted

1 solution

It does not look like a valid URL. It should be either "http://domain.com/whatever-the-path-is/zestimg.jpg" or a file name relative the the page where it is used.

Also, it looks like you try to track you path name from the file path name on your service computer. URL paths are not built this way. After domain name a directory relative to the root path of your site should go. Look at the URLs of your site (those which already work) from the address like of some Web browser. You will see that "httpdocs" never appears. All the directories outside of the root directory of your site are completely invisible to the Web site user.

—SA
 
Share this answer
 
v2
Comments
fjdiewornncalwe 13-Jul-11 14:45pm    
Good read.
Sergey Alexandrovich Kryukov 13-Jul-11 14:46pm    
Thank you, Marcus.
--SA
RaviRanjanKr 13-Jul-11 16:39pm    
Nice Answer SA, My 5+
Sergey Alexandrovich Kryukov 13-Jul-11 16:40pm    
Thank you, Ravi.
--SA
tulasiram3975 15-Jul-11 9:10am    
Sir actually it is taking Out Side my root Directory Content also.... i mean out side of our application folder

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