hi
I use below code for uploading image:
if (fup1.HasFile && fup1.PostedFile.ContentLength< 102400)
{
string path = Server.MapPath("~/Image/Estate/");
string fileName = System.IO.Path.GetFileName(fup1.PostedFile.FileName);
if (Array.IndexOf(new string[] { ".jpg", ".png" }, System.IO.Path.GetExtension(fup1.PostedFile.FileName).ToString().ToLower()) < 0)
{
return;
}
while (System.IO.File.Exists(path + "\\" + fileName))
{
fileName = "1" + fileName;
}
fup1.PostedFile.SaveAs(path + fileName);
Img1.Visible = true;
Img1.ImageUrl = GetThumbNail("~/Image/Estate/" + fileName);
Lblimg1.Text = fileName;
Imgdelete1.Visible = !(BtnPopup1.Visible = false);
Img1.Visible = true;
Img1.ImageUrl = "~/Image/Estate/" + fileName;
}
in below line I define size of image that users can upload
if (fup2.HasFile && fup2.PostedFile.ContentLength < 102400)
now I want define that users can just upload image with below size:
700*350-->width=700px height=350px
how I can do it?
best regards
neda