Hi, I have a datalist that is used in conjunction to display values
retrieved from a database:
What I would like to do is check the value of a field and then do something
(Change a label or whatever).
Below is my code
VB Code:
' Create a datalist <asp:DataList id="MyList" RepeatColumns="2" runat="server"> <ItemTemplate> <table border="0" width="272"> <tr> <td width="25">   </td> ' I would like to check the value of the following item and then do ' something if the item is less than 0 ' e.g if DataBinder.Eval(Container.DataItem, "UnitCost", "{0:c}") < 0 ' then response.write("hi") <span class="ProductListItem"> <%# DataBinder.Eval(Container.DataItem, "UnitCost", "{0:c}") %> </span>
Any help appreciated
Cheers
Mark




Reply With Quote