Add 2 values in Repeater
-
:) Hi All, I have a repeater that uses an XML file as its datasource. I want to add 2 of the retrieved values. How would i do this without messing with the DataSet in code behind? <ItemTemplate> <td> <%# DataBinder.Eval(Container.DataItem, "ISLTournamentBuyIn")%> + <%# DataBinder.Eval(Container.DataItem, "ISLTournamentFee")%> </td> </ItemTemplate> Thanks.
-
:) Hi All, I have a repeater that uses an XML file as its datasource. I want to add 2 of the retrieved values. How would i do this without messing with the DataSet in code behind? <ItemTemplate> <td> <%# DataBinder.Eval(Container.DataItem, "ISLTournamentBuyIn")%> + <%# DataBinder.Eval(Container.DataItem, "ISLTournamentFee")%> </td> </ItemTemplate> Thanks.
The easiest way to do this would be to get a data table from the dataset, add two new rows and bind the repeater. That way you aren't changing the dataset but you are getting the results you want.
I didn't get any requirements for the signature
-
The easiest way to do this would be to get a data table from the dataset, add two new rows and bind the repeater. That way you aren't changing the dataset but you are getting the results you want.
I didn't get any requirements for the signature
Hi Todd, Thanks for your response.:cool: While your solution is one that will work i eventually found a way to do it all front end :) <ItemTemplate> <td><%#(Convert.ToInt32(Eval("Column1")) +Convert.ToInt32(Eval("Column2"))/100)%></td> </ItemTemplate> Thanks again.