Author: dkaur76 | Posted on: 4/5/2009 6:45:16 PM | Views : 710

 I want to display thumbsup.gif if Request.QueryString["Measurement"] is between110 and140, else display thumbsdown.jpg.
How do I do that? Pls give sample code. I tried the following approach but it only displays the alt text 'test img'.
My aspx file has the following code:

<asp:Image ID="Image1" runat="server" AlternateText="test img" ImageUrl="img.jpg"/>
My aspx.cs file has the following code:
if (Convert.ToInt32(Request.QueryString["Measurement"]) >= normalAfterMealMgdlGreenMin && Convert.ToInt32(Request.QueryString["Measurement"]) <= normalAfterMealMgdlGreenMax)
{
Image1.ImageUrl = Server.MapPath("thumbsup.gif");

} else Image1.ImageUrl = Server.MapPath("thumbsdown.jpg");

 
Thanks in advance.

...

Go to the complete details ...