Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-30-2005, 07:01 PM #1
- Join Date
- Dec 2005
- Thanked 0 Times in 0 Posts
Assign image based on category variable value
I have an aspx page http://www.fast-drinks.com/Categories.aspx - There are various categories eg Spirits, Wines, beer - but within each category there are sub categories eg for Spirits you have Gin, Vodka, Whiskey etc.
The Category is being displayed in the html via the variable <%=SuperCats%> (I'm presuming this is an ASP (or ASP.Net) variable - I'm new to this!). What I want to do is depending on this value to display a different image. If you go to the above page you will see a grey bar with no content about 2 inches down the page. I want to put one image in this bar if <%=SuperCats%> is Spirits and another if its Wine and another if its Champagene, and anther if its Gifts, and anotherif .........................
THis is the code black I have at the moment
<tr height="22" style="background-image:url(images/front_end_site_images/sort_bar.gif)">
if (<%=SuperCats%>=="Gift Ideas")
else if (<%=SuperCats%>=="Champagnes")
Your help is appreciated in any way shape or form.
Thanks and Best Regards
12-31-2005, 10:00 AM #2
- Join Date
- Oct 2005
- Bombay, India
- Thanked 2 Times in 2 Posts
i don't know how the varible 'SuperCats' is assigned values... but if you could give the name of the image to the variable... you could do it in one line...