kurt sune wrote:
I have made an user control for a header for all web pages.
Now I want to add an image in the header.
What is the best way of embedding a GIF in the usercontrol?
I donot want to distribute the image separately from the usercontrol.
Put the gif in the resourcefile?
Other options?
/k
You can't just embed an image in the html-stream, images are always
requested by the server in a separate request.
The html-source just contains an <img> tag with a "src" attribute
pointing somewhere. The browser reacts to this by sending a separate
request for the url in that src attribute.
So if you don't want to have a separate file, you will have to provide some
other means to get at that image. This usually means that you need
a separate aspx or an http-handler (or in general: some url that will
provide that image -- which can then come from some other place on the
filesystem, a database or a resource file).
Hans Kesting