i tried and get the sum of two numbers by getting through eval

<%# Convert.ToDecimal(Eval("total"))+ Convert.ToDecimal(Eval("tax")) %>

by doing this i got the sum of (total + tax) now i need to find the division. Is it possible to divide like <%# Convert.ToDecimal(Eval("total"))/ Convert.ToDecimal(Eval("qty")) %> the above. my code in detail

<asp:Repeater ID="Repeater1" runat="server">
                                                            <ItemTemplate>
                                                                <tr>
                                                                    <td class="text-left"><%#Eval("rowId") %></td>
                                                                    <td><%#Eval("product_name") %> - <%#Eval("product_des") %></td>
                                                                    <td class="text-center"><%#Eval("qty") %></td>
                                                                    <td class="text-center"><%#Eval("uom") %></td>
                                                                    <td class="text-center"><%#Eval("tax_percent") %></td>
                                                                    <td class="text-right"><%# Convert.ToDouble(Convert.ToDecimal(Eval("total"))/ Convert.ToDecimal(Eval("qty")))%></td>
                                                                    <td class="text-right"><%# Convert.ToDecimal(Eval("total"))+ Convert.ToDecimal(Eval("tax")) %></td>
                                                                    <td class="text-center"><%#Eval("type") %></td>
                                                                    <td class="text-right">
                                                                        <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl="assets/btn/edit_btn.png" OnClick="ibtnEdit_Click" CommandArgument='<%#Eval("rowId") %>' />

                                                                        <asp:ImageButton ID="ibtn_Delete" runat="server" ImageUrl="assets/btn/delete_btn.png" OnClick="ibtn_Delete_Click" CommandArgument='<%#Eval("rowId") %>' OnClientClick="return confirm('Are you sure you want to delete?');" />

                                                                    </td>


                                                                </tr>

                                                            </ItemTemplate>
                                                        </asp:Repeater>

please help me. thanks in advance

Related posts

Recent Viewed