Hey
>
asp.net 2.0
I have a webpage which generate thumbnail images. In another webpage I want
to display these images...
I tryed using this solution:
<img ID="photo" src="../../images/helloworld.jpeg"/>
But this gives this error:
File '../../images/helloworld.jpeg' was not found
The file helloworld.jpeg exist in the ../../images/ folder.....
If I in solution explorer right click and choose "Add Existing Item" and add
this image, then this works.... but the images are generated dynamically in
runtime so adding them to the project isn't a good solution
Any ideas what I should do to solve this?
Jeff
I take it the *browser* gives that errormessage?
What is in the html that the browser received (do a "view source").
Does the "src" still point to the directory you think it should point
at?
Reason: if the "src" attribute is processed by the asp.net environment
(as it will be when you add a runat=server attribute), then it might be
changed. When this code is in an ascx, the path is taken to be relative
to the *ascx*, not relative to the aspx it ends up in.
When this is the case, you could use "webapp-root-relative" paths, by
starting with a "~" (~/images/helloworld.jpeg). This will work wherever
the application is installed: //localhost/theApp/Web or
//www.somesite.com
Hans Kesting