I want to display one image if my variable measurement is between var1 and var2 and another image if it is not between var1 and var2.
My code in aspx file:
<asp:Label ID="user_bgUnits" runat="server"></asp:Label>
Code in aspx.cs file:
if (Convert.ToInt32(Measurement) >= normalAfterMealMgdlGreenMin && Convert.ToInt32(Measurement) <= normalAfterMealMgdlGreenMax)
{
Image1.ImageUrl = Server.MapPath("thumbsup.gif");
}
else Image1.ImageUrl = Server.MapPath("thumbsdown.jpg");
It does not display any image. I checked it in the Viual Studio debugger . It goes in the " if " and "Image1.ImageUrl" gets the right url for "thumbsup. ...
Go to the complete details ...