image saving

  • Thread starter Thread starter Viktor Popov
  • Start date Start date
V

Viktor Popov

Hi,
I' like to ask if someone kows how could be saved an image filepath in DB
instead the whole IMAGE using ASP.NET/S#/MS SQL?
Let's say we have:
PicturesTBL
----------------
ID INT
PIC IMAGE
Could be use PIC VARCHAR(50) or something to save the filepath and to store
the image on server's directories?

Thank in advance!

Viktor Popov
 
try putting

<input id="fileUpload" type=file/>

in your html

and in *.as*x.cs

HtmlInputFile file = (HtmlInputFile)Page.FindControl("fileUpload");

you can use file.PostedFile to get the file infomation
and method file.PostedFile.saveas("") to save the file on server hd.

stroring the information in your db is up to you

hope this helps
 

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