ASPNET_8
asked on
Picture Upload in asp.net
I want to upload pictures only using the file upload control .
what wud be the C# code for that
thanks
what wud be the C# code for that
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Was not that helpful
System.Drawing.Image img = System.Drawing.Image.FromS
if (img.RawFormat.Guid == System.Drawing.Imaging.Ima
{
//Ur coding
}
// if you want to return the type of the image, try this:
public static string MimeType(System.Drawing.Im
{
foreach (ImageCodecInfo codec in ImageCodecInfo.GetImageDec
{
if (codec.FormatID == imgPhoto.RawFormat.Guid)
return codec.MimeType;
}
return "image/unknown";
}