G
Guest
Hi All,
Environment: ASP.Net , framework 1.1, VS2003. Database: Sql server 2000
I have an MS DATALIST which has Item Templates, show the image and the price
right next to the "PRICE" text. the image name and the Price is being
populated from the datbase. All i do it get a datatable frm the database and
set it to the datasource of the grid it autoppulates it. The code in the HTML
section of the page for the grid which tells what fields are to be writen and
where to write them is :
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<TABLE height=126 width=194 border=0>
<TR>
<TD><IMG height=136 src='<%# DataBinder.Eval(Container.DataItem,
"ProductImage") %>'></TD>
<TD class="plaintext">PRICE : '<%# DataBinder.Eval(Container.DataItem,
"price") %>'>
</TR>
</TABLE>
</ItemTemplate>
Now i want to add another field in their from the datatable which will haev
the sale price, and if their is a sale price for an item only then the Class
prperty of the PRICE Value should be "StiredNormalText" so that the price is
striked out and the the Sale price should appear benath it, once again if
their is no saleprice for an item then the CLASS of the Lable only for that
item should be "plaintext" and if their is then it should be
"StiredNormalText". their coudl be multuple records in the datatable. how can
i do this, can it be done? Please suggest.
Sameer
Environment: ASP.Net , framework 1.1, VS2003. Database: Sql server 2000
I have an MS DATALIST which has Item Templates, show the image and the price
right next to the "PRICE" text. the image name and the Price is being
populated from the datbase. All i do it get a datatable frm the database and
set it to the datasource of the grid it autoppulates it. The code in the HTML
section of the page for the grid which tells what fields are to be writen and
where to write them is :
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<TABLE height=126 width=194 border=0>
<TR>
<TD><IMG height=136 src='<%# DataBinder.Eval(Container.DataItem,
"ProductImage") %>'></TD>
<TD class="plaintext">PRICE : '<%# DataBinder.Eval(Container.DataItem,
"price") %>'>
</TR>
</TABLE>
</ItemTemplate>
Now i want to add another field in their from the datatable which will haev
the sale price, and if their is a sale price for an item only then the Class
prperty of the PRICE Value should be "StiredNormalText" so that the price is
striked out and the the Sale price should appear benath it, once again if
their is no saleprice for an item then the CLASS of the Lable only for that
item should be "plaintext" and if their is then it should be
"StiredNormalText". their coudl be multuple records in the datatable. how can
i do this, can it be done? Please suggest.
Sameer