Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
code for upload image and store into folder and database?
Posted 26-Aug-12 18:49pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try This :
 
 
        string path = "",file_path="",image_path="";
        path = Server.MapPath("images/");
 
        if (FileUpload1.HasFile)
        {
 
            string file_ext = System.IO.Path.GetExtension(FileUpload1.FileName);
            FileUpload1.SaveAs(path + FileUpload1.FileName + file_ext);
            image_path = "images/"+FileUpload1.FileName+ file_ext; // path for store in Database

            Apply the Insert Query with image_path
       }
 
 
If any query Please Post it....
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

hi,
 
please refer the below link,
 
[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 27 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid