Upload pictures and modify their big
// thefile is a File Field HTML control thefile.PostedFile.SaveAs (System.Web.HttpContext.Current.Server.MapPath ( "temp.png")); MemoryStream MemStream = new MemoryStream (); System.Drawing.Image imgOutput = System.Drawing.Bitmap.FromFile (System.Web.HttpContext.Current.Server.MapPath ( "temp.png")); // modified to 80 × 80 size System.Drawing.Image imgOutput2 = imgOutput.GetThumbnailImage (80,80 , null, IntPtr.Zero); imgOutput2.Save (System.Web.HttpContext.Current.Server.MapPath ( "image.png"), ImageFormat.Png); Response.Write (thefile.PostedFile.FileName); Response.Write ("Len:" Memstream.Length.Tostring ()); imgoutput.dispose (); imgoutput2.dispose (); response.write ("Upload success!"); Response.write (System.Web.httpContext.current. Server.mappath ("Image.png"));