ASP.NET DataList "check negitive and positive values"

Posted by Nisar under ASP.NET on 1/30/2011 | Points: 10 | Views : 1731 | Status : [Member] | Replies : 2
Hi,

I have a variable "Amount" containing positive value and negitive value

I have 2 column with same name in asp.net datalist, one for positive values and one for negitive values.

i want that i check the value if value is negitive it should go in negitive column and if value is positive then it
should go in positive value column.

Here is asp.net code
<asp:DataList ID "dlist" runat="server">

<ItemTemplate>
<tr>
<td align="right"><%#Eval("Amount")%></td> // Positive value should go in this
<td align="right"><%#Eval("Amount")%></td> // negitive value should go in this
</tr>
</ItemTemplate>
</asp:DataList>

Looking for solution.
Regards
Nisar




Responses

Posted by: Vuyiswamb on: 1/31/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Why don't to do this data Manipulation on the database side and just bind the control when you are done ?

Thank you for posting at Dotnetfunda
[Administrator]

Nisar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nisar on: 1/31/2011 [Member] Starter | Points: 25

Up
0
Down

I get data from web service, so i need to do in this way, as above mentioned.

Any solution?

Thanks

Nisar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response