Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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;
}
Comment

calculated field gridview asp.net

<asp:Label ID="lblCalc" runat="server" >
    <%# Calculate(Eval("val1").ToString(), Eval("val2").ToString()) %>
</Label>
Comment

PREVIOUS NEXT
Code Example
Csharp :: google script get font color 
Csharp :: c# asp.net gridview selected row unselect 
Csharp :: c# convert linq jValue to int 
Csharp :: C# enum fglag 
Csharp :: unity c# script for movement left and right 
Csharp :: How Many Vowels 
Csharp :: catwherehouse 
Csharp :: using selected item in listbox c# to fill texbox 
Csharp :: c# wtssendmessage 
Csharp :: c# use cefcharp and selenium can? 
Csharp :: c# string is all zeros 
Csharp :: how to execute a function in every object of list c# 
Csharp :: how to store more precise data then float c# 
Csharp :: single number c# 
Csharp :: OOP inC# 
Csharp :: unity enable hdr picker 
Csharp :: open aspx page c# 
Csharp :: Set property of control on form by name 
Csharp :: c# user name session 
Csharp :: How to add dollar sign $ to strings in Dart 
Csharp :: change character velocity unity 
Csharp :: DotNet web Api Token based Authentication 
Csharp :: create entity c# d365 
Csharp :: c# fold list 
Csharp :: get current culture in controller asp.net core 6 
Csharp :: c# check if there is 5 mins space between two datestime 
Csharp :: Handle all AggregateExceptions when using Task.Whenall() async 
Csharp :: EF will not create columns RULE 
Csharp :: c# extension method in non static class 
Csharp :: as c# 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =