Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

How to Re size Image and save in folder and Image Name and ID in Database ?

$
0
0

My code for Image Insertion is 

   string savepath;

   string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
   savepath = "~/Images/" + filename;
    FileUpload1.SaveAs(Server.MapPath(savepath));
   SqlCommand cmd = new SqlCommand("Insert into ReImage(ImageName) values('" + filename + "')", con);
  con.Open();
cmd.ExecuteNonQuery();
con.Close();


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>