Mark Fitzpatrick said:
			
		
	
	
		
		
			No. To avoid stretching you would have to resize the image proportionally
through code. In other words, open the image through the System.Drawing
classes and check the width and height and then setting the
image/imagebutton's width and height to be a new height and width
proportional to the old. HTML doesn't make any allowances for doing
proportional changes itself or for percentage dimensions.
		
		
	 
I tried that but I can't seem to get the oThumbnail.Save to work. I get the
following error:
System.Runtime.InteropServices.ExternalException: A generic error occurred
in GDI+.
theFileName = New FileInfo(strFileName)
fileOut = fileIn.Substring(0,fileIn.LastIndexOf(".")) &
session("User").CompanyID & fileIn.Substring(fileIn.LastIndexOf("."))
pathFileOut = Server.MapPath("\Uploads") & "\" &
fileIn.Substring(0,fileIn.LastIndexOf(".")) & "Temp" &
fileIn.Substring(fileIn.LastIndexOf("."))
MyFile2.PostedFile.SaveAs(PathFileOut)
'   Write out a temporary file that will be read back in for thumbnail
Dim oImage As System.Drawing.Image
oImage = oImage.FromFile(pathFileOut)
'   Read back in File, create thumbnail and save it
Dim oThumbnail as System.Drawing.Image
oThumbnail = oImage.GetThumbnailImage(100,200,Nothing,Nothing)
thumbnailFileOut = Server.MapPath("\Uploads") & "\" &
fileIn.Substring(0,fileIn.LastIndexOf(".")) &
fileIn.Substring(fileIn.LastIndexOf("."))
oThumbnail.Save(Server.MapPath("uploads") & "\" & fileOut,
ImageFormat.Jpeg)
I am getting the error on the last line.
The path and filename are valid.  It is the same as when I saved the
original file (MyFile2.PostedFile.SaveAs(PathFileOut)).
Thanks,
Tom