hi! help...
How do you show/hide item's data?
Like sale item on product catalogue.
I want to show the sale image when the status of product is on sale.
in my catalogue I use datalist:
------------------------------------------------------------------
<ASP:DataList id="MyDataList" RepeatColumns="3" runat="server">
<ItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td valign="top" align="center"> <a href='<%# "item.aspx?pid=" &
Container.DataItem("pid") %>'><img align="top" src='<%# DataBinder.Eval
(Container.DataItem, "img") %>' width="225" height="225" border=0>
</a> </td> </tr>
<tr>
<td valign="top" align="center">
<b>
<asp:HyperLink runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "pname") %>' NavigateUrl='<%# "item.aspx?pid=" &
Container.DataItem("pid") %>' ID="Hyperlink1"/> </b>
<br>
<%# DataBinder.Eval(Container.DataItem, "pdesc") %>
<br>
<b>
<asp:Label ID="sale" Runat=server></asp:Label>
<font color="#FF9900">SG
<%# DataBinder.Eval(Container.DataItem, "price", "$ {0}") %>
</font></b>
<p>
<a href='<%# DataBinder.Eval(Container.DataItem, "pid",
"shoppingcart.aspx?pid={0}") %>' >
<img border="0" src="../img/cartempty.gif"> </a>
</td>
</tr> </table> </ItemTemplate>
</ASP:DataList>
------------------------------------------------------------------
Here's my asp.net vb code:
------------------------------------------------------------------
Dim ds as dataset
'ds return dataset of results where category is Adult Costumes and
subcategory is Men
ds = P.getSub("*", "product", "category", "Adult Costumes",
"subcategory", "Men")
MyDataList.DataSource = ds.Tables("product").DefaultView
MyDataList.DataBind()
------------------------------------------------------------------
the tables product has a column name 'status' and the value will be 'sale'
if the product is on sale, else 'active'.
Do you have any idea how can i show/hide the sale image on the sale item in
the catalogue?
Thanks :)
--
Message posted via http://www.dotnetmonster.com