ib bellad

ib bellad

  • 1.4k
  • 376
  • 35.1k

if else condition in repeater itemtemplate.

Dec 16 2015 12:55 PM
 Hi,
        How to check the if else condition in repeater itemtemplate.
Tax amount is different there for each item. 
<asp:Repeater runat="server" ID="rptmeasurement">
<ItemTemplate>
 
<%if (Eval("itemname").ToString()=="One") {%>
<div class="col-md-1 col-sm-1 col-xs-1 brd"><%#Eval("Onetaxamount") %></div>
<div class="col-md-1 col-sm-1 col-xs-1 brd"><%#Convert.ToDouble(Eval("Amount"))+Convert.ToDouble(Eval("Onetaxamount"))%></div>
<%}
else if (Eval("itemname").ToString()=="Two") { %>
<div class="col-md-1 col-sm-1 col-xs-1 brd"><%#Eval("Two") %></div>
<div class="col-md-1 col-sm-1 col-xs-1 brd"><%#Convert.ToDouble(Eval("Amount"))+Convert.ToDouble(Eval("Twotaxamount"))%></div>
<%}
 
</ItemTemplate> 
</asp:Repeater> 
 
 
Thanks In Advance 

Answers (1)