Image img = new Image(); img.ImageUrl = "admin/images/image.png"; this.Controls.Add(img); Double u = img.Height.Value;
above code doesnot work. any ideas.
this worked for me , you can try this way
System.Drawing.Image objImage = System.Drawing.Image.FromFile("C:\imagename.gif"); width = objImage.Width; height = objImage.Height;
i have the path as admin/images/image.png
how can i point to this. instead of looking in the local c drive. i wan to look in the web server folder
You can get from this also
System.Drawing.Image objImage = System.Drawing.Image.FromFile("Pass here Byte array of file"); width = objImage.Width; height = objImage.Height;