I want to make restriction to the dimensions of the asp.net C# image.
I have image1:
ImageButton ib = (ImageButton)sender;
Image1.ImageUrl = ib.ImageUrl;
Also I have:
Image tempImage = new Image();
tempImage.ImageUrl = ib.ImageUrl;
next I am setting dimensions of image1
Image1.Width = Math.Max(tempImage.Width, 1000);
Here I get compiler error: math.max has bad parameters. So the aim is to not allow the width of image be bigger than 1000. How this can be done?