Include image from local directory to webform?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have images in local server directory.
Can I stream down image into HTML WebForm, on place reserved to specific
image, and show to clients.
I wish to avoid coping images to virtual directory.



Thank you
 
you can use

Request.PhysicalApplicationPath + "\your folder\"

to get to the images.

rg,
Eric
 
Thanks for answer.
You missunderstoond me.

Image in HTML page that is to be shown on client browser, is located in
Server Local directory.

Thank you.
 
Create a virtual folder pointing to your image folder and use that virt.
folder for any <img> tags:

<img src='/imgvirtdir/myimage.jpg">

Will that work for you?

Hello,

I have images in local server directory.
Can I stream down image into HTML WebForm, on place reserved to specific
image, and show to clients.
I wish to avoid coping images to virtual directory.



Thank you
 
Thank you for your answer.

But I'm interest is there a way to avoid creating virtual directory. Just
allication to read from local dir, and sream into HTML response. Somthing
like pooling picture from database.

Thanks you.
MilanB
 
Perhaps you can consider using HTTP Handlers. Here is a sample:
http://www.developer.com/net/asp/article.php/3565541

Basically, your ProcessRequest will read the image file from the folder as
requested and stream it back to the client.

Thank you for your answer.

But I'm interest is there a way to avoid creating virtual directory. Just
allication to read from local dir, and sream into HTML response. Somthing
like pooling picture from database.

Thanks you.
MilanB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top