Click here to Skip to main content
15,878,809 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
<asp:TemplateField HeaderText="GST%" HeaderStyle-Width="15%" SortExpression="cgstPer">
                                   <ItemTemplate>
                                       <asp:Label ID="lblcgstPer" runat="server" Text='<%# Eval("cgstPer") %>'></asp:Label>

                                   </ItemTemplate>
                                   <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                   <ItemStyle HorizontalAlign="Left"></ItemStyle>
                               </asp:TemplateField>
                               <asp:TemplateField HeaderText="totalGst" HeaderStyle-Width="15%" SortExpression="aferDiscountValue">
                                   <ItemTemplate>
                                       <asp:Label ID="lblcgstPer" runat="server" Text='<%# Eval("cgstPer") %>'></asp:Label>

                                   </ItemTemplate>
                                   <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                   <ItemStyle HorizontalAlign="Left"></ItemStyle>
                               </asp:TemplateField>


What I have tried:

<asp:Label ID="lblcgstPer" runat="server" Text='<%#Convert.ToInt32(Eval("cgstPer")) +Convert.ToInt32(Eval("sgstPer")) %>'></asp:Label>
Posted
Updated 22-May-21 1:30am
v4
Comments
CHill60 22-May-21 8:13am    
I would do this while populating the gridview in the first place but there is not enough here for me to suggest how to do that. Can I suggest you edit your question and actually add a description of your problem instead of just dumping your code. The title of your question is not enough

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900