You must Sign In to post a response.
  • Category: ASP.NET

    I am doing web calculator project How to write add and equaltwo coding in c#.

    Hi Friends

    I am doing web calculator project How to write add and equal two coding in c#. Plz guide me. +-*/ button 1 to 4 5 is equal two.

    coding


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    namespace WebApplication1
    {
    public partial class WebForm1 : System.Web.UI.Page
    {

    protected void Page_Load(object sender, EventArgs e)
    {


    }

    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }

    protected void Button13_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 1;
    }

    protected void Button14_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 2;

    }

    protected void Button15_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 3;

    }

    protected void Button9_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 4;

    }

    protected void Button10_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 5;

    }

    protected void Button12_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 6;

    }

    protected void Button6_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 7;

    }

    protected void Button7_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 8;

    }

    protected void Button8_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 9;

    }

    protected void Button17_Click(object sender, EventArgs e)
    {

    TextBox1.Text = "";

    }

    protected void Button16_Click(object sender, EventArgs e)
    {
    TextBox1.Text = TextBox1.Text + 0;

    }

    protected void Button1_Click(object sender, EventArgs e)
    {

    double total1 = 0;
    total1 = total1 + double.Parse(TextBox1.Text);

    }

    protected void Button5_Click(object sender, EventArgs e)
    {

    }
    }
    }


    wds
    vrameshsrinivasan
    vramesh2019@gmail.com
  • #769422
    You can refer following link.
    http://www.c-sharpcorner.com/UploadFile/ad779a/basic-calculator-in-C-Sharp/


  • Sign In to post your comments