1
Answer

if else condition in repeater itemtemplate.

ib bellad

ib bellad

8y
2.7k
1
 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)