if ((fileExt2.ToUpper() == ".JPG")||(fileExt.ToUpper() == ".JPEG")||(fileExt.ToUpper() == ".PNG")||(fileExt.ToUpper() == ".GIF"))
{
if (Fupimage.PostedFile.ContentLength > 1000000)
{
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Alert", "alert('File is too big.')", true);
}
else
{
Do something;
}
}
else
{
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Alert", "alert('File is not appropriate.')", true);
}
why this if statement doesn't work. it only accepts .jpg files and it doesn't check other conditions, if the file was png or gif or jpeg it ...
Go to the complete details ...