Hi,
I use AsyncFileUpload to upload images. It works fine.
In this code I check so the size isn´t bigger than 1 MB and that it is a .jpg file.
What I also will need to check is that the Width isn´t bigger than 100 and the height isn´t bigger than 200.
I wonder how that could be possible to do in the code.
Thank you
protected void AsyncFileUpload5_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
if (Convert.ToInt32(e.filesize.ToString()) > 1000000)
{
ScriptManager.RegisterStartupScript(this, GetType(), "TestAlert", "alert('" + "Image has to be less than 1MB in size" + "');", true);
}
if (GetExtension != ".jpg")
{
ScriptManager.RegisterStartupScript(this, GetType(), "Test ...
Go to the complete details ...