Answers for "calculated field gridview asp.net"

C#
0

calculated field gridview asp.net

<asp:Label ID="lblCalc" runat="server" >
    <%# Calculate(Eval("val1").ToString(), Eval("val2").ToString()) %>
</Label>
Posted by: Guest on August-05-2020
0

calculated field gridview asp.net

protected decimal Calculate(string a, string b)
{
    decimal ad = Convert.ToDecimal(a);
    decimal bd = Convert.ToDecimal(bd);

    if (bd == 0)
    {
        return 0; // or whatever
    }

    return ad / bd;
}
Posted by: Guest on August-05-2020

Code answers related to "calculated field gridview asp.net"

C# Answers by Framework

Browse Popular Code Answers by Language