How to use class, method and argument in asp.net c#

Class file example - class, method and argument
UsingClassFileExample.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    protected void Page_Load(object sender, System.EventArgs e) {
        CalculatorClass myCalculator = new CalculatorClass();
        Label1.Text = "Result[10+5] :" +
            myCalculator.AddMethod(10, 5).ToString();

        Label2.Text = "Result[10-5] :" +
            myCalculator.SubtractMethod(10, 5).ToString();

        Label3.Text = "Result[10*5] :" +
            myCalculator.MultiplyMethod(10, 5).ToString();

        Label4.Text = "Result[10/5] :" +
            myCalculator.DevideMethod(10, 5).ToString();

        Label5.Text = "Result[10*10] :" +
            myCalculator.SquareMethod(10).ToString();
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>asp.net class file example: how to use class, method, argument in asp.net</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Fuchsia">Using Class</h2>
        <hr />
        <asp:Label ID="Label1" runat="server" Font-Size="Large" ForeColor="Teal"></asp:Label>
        <br /><br />
        <asp:Label ID="Label2" runat="server" Font-Size="Large" ForeColor="Crimson"></asp:Label>
        <br /><br />
        <asp:Label ID="Label3" runat="server" Font-Size="Large" ForeColor="DarkCyan"></asp:Label>
        <br /><br />
        <asp:Label ID="Label4" runat="server" Font-Size="Large" ForeColor="DarkBlue"></asp:Label>
        <br /><br />
        <asp:Label ID="Label5" runat="server" Font-Size="Large" ForeColor="DarkGreen"></asp:Label>
    </div>
    </form>
</body>
</html>
CalculatorClass.cs

using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for CalculatorClass
/// </summary>
public class CalculatorClass 
{
    public int AddMethod(int ArgumentA, int ArgumentB) 
    {
        return (ArgumentA + ArgumentB);
    }

    public int SubtractMethod(int ArgumentA, int ArgumentB)
    {
        return (ArgumentA - ArgumentB);
    }

    public int MultiplyMethod(int ArgumentA, int ArgumentB)
    {
        return (ArgumentA * ArgumentB);
    }

    public int DevideMethod(int ArgumentA, int ArgumentB)
    {
        return (ArgumentA / ArgumentB);
    }

    public int SquareMethod(int ArgumentA)
    {
        return (ArgumentA * ArgumentA);
    }
}
More asp.net examples