soona Posted November 6, 2008 Share Posted November 6, 2008 Hi experts,Pls clear my idea for my given code using asp.net with c#.protected void SubmitBtn_Click(object sender, EventArgs e) { path2 = ""; if ((ImageUpload.HasFile) && (ImageUpload.PostedFile.ContentLength != 0)) { path1 = ImageUpload.PostedFile.FileName.ToString(); path2 = path1.Substring(path1.LastIndexOf("\\") + 1); } string getimgfolpath = MapPath(@"~\Imagesfolder_1\"); getimgfolpath = getimgfolpath + Convert.ToString(Id) + "_img." + path2; ImageUpload.SaveAs(getimgfolpath); Bitmap upimgsize = new Bitmap(getimgfolpath); Imagesizes = String.Format("{0} and {1}", upimgsize.Width, upimgsize.Height); lblmsg.Text = Imagesizes ; }From the code explanation : Just saved a uploaded images in "Imagesfolder_1" folder and shown image width and height values in "lblmsg"I would like to check my uploaded image with fixed value.My Query:-> I dont know where to fix my own value(image sizes) and how to check with "Imagesizes" and "getimgfolpath" ?here, i confused how can i implement this concept.Please give some idea to implement and any suggestions for my query.Its very urgent.....Thanks Link to comment Share on other sites More sharing options...
jesh Posted November 6, 2008 Share Posted November 6, 2008 Have you tried Google?http://www.google.com/search?q=resizing+images+asp.net+C%23 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.