C# asp.net

Discussion in 'Software' started by ahsan2011, Apr 18, 2007.

  1. ahsan2011

    ahsan2011

    Joined:
    Apr 17, 2007
    Messages:
    2
    hi i m started learnin asp.net..need help..

    i have created 3 textboxes and a button..

    wanna display the no in first two boxes and display their sum in the third box at the click of a button..

    have tried writing the code at the button event.

    textbox3.text = textbox1.text + textbox2.text

    but it adds the strings together...eg12 +11 =1211

    when i write
    textbox3.text = convert.toint32(textbox1.text) + convert.toint32(textbox2.text)
    but it shows "implicitly cannot convert string to int...

    please help
     
    ahsan2011, Apr 18, 2007
    #1
    1. Advertising

  2. ahsan2011

    Mr_helper

    Joined:
    May 12, 2007
    Messages:
    1
    use this code

    int sum = Convert.ToInt32(textBox1.Text) + Convert.ToInt32(textBox2.Text);
    textBox3.Text = sum.ToString();

    Or

    textBox3.Text = Convert.ToString(Convert.ToInt32(textBox1.Text) + Convert.ToInt32(textBox2.Text));
     
    Last edited: May 12, 2007
    Mr_helper, May 12, 2007
    #2
    1. Advertising

  3. ahsan2011

    abdul

    Joined:
    Jun 6, 2007
    Messages:
    1
    how to include user-defined class in asp.net2005

    i want to know how to include a class in asp.net 2005 framwork 2.0
     
    abdul, Jun 7, 2007
    #3
  4. ahsan2011

    fred5152

    Joined:
    Dec 18, 2007
    Messages:
    12
    if you wan to use the class in the whole application better define your class in the app_code folder
     
    fred5152, Dec 18, 2007
    #4
  5. ahsan2011

    ousrah

    Joined:
    Dec 26, 2007
    Messages:
    1
    put

    val(eg12.text) + 11

    thas well go
     
    ousrah, Dec 26, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2FuanU=?=

    information about asp ,oracle,asp.net certification?

    =?Utf-8?B?c2FuanU=?=, May 18, 2005, in forum: Microsoft Certification
    Replies:
    1
    Views:
    679
    Bob Christian
    May 18, 2005
  2. Zabron Muyambo

    Easy Moving from ASP to ASP.NET???

    Zabron Muyambo, Oct 26, 2004, in forum: MCSD
    Replies:
    7
    Views:
    539
    Zabron Muyambo
    Oct 27, 2004
  3. thehobbit
    Replies:
    0
    Views:
    3,905
    thehobbit
    Nov 22, 2006
  4. imman

    session from asp to asp.net

    imman, Feb 20, 2008, in forum: General Computer Support
    Replies:
    0
    Views:
    950
    imman
    Feb 20, 2008
  5. london1919
    Replies:
    1
    Views:
    3,067
    Lawrence Garvin \(MVP\)
    Dec 8, 2008
Loading...

Share This Page