hi if (FileUpload1.HasFile)
{
string savePath = Server.MapPath("~/memberspic/");
string fileName = FileUpload1.FileName;
string pathToCheck = savePath + fileName;
Random rm = new Random();
TextBox txtpass = new TextBox();
txtpass.Text = rm.Next(257871, 498371).ToString();
string extension = Path.GetExtension(FileUpload1.PostedFile.FileName);
//FileUpload1.SaveAs(savePath + "img_pk" + txtpass.Text.ToString() + extension);
FileUpload1.SaveAs(Server.MapPath("~/memberspic/") + "img_pk" + txtpass.Text.ToString() + extension);
string te;
te = "~/memberspic/" + "img_pk" + txtpass.Text.ToString() + extension;
// }
by using above code we can upload the images in to folder.
but i want to reduce the file size before when i save the file into folder please help me
How to reduce the image file size
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 13, 2013, 3:15 AM EDT
http://www.aspdotnet-suresh.com/2011/05/how-to-resize-size-image-without-losing.html
prathyusha173 reputationPosted Jun 13, 2013, 4:32 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 13, 2013, 10:47 AM EDT
i attached a file check that . if any doubt reply.