asp.net problem

Discussion in 'General Computer Support' started by ahsan2011, Apr 17, 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 17, 2007
    #1
    1. Advertising

  2. ahsan2011

    fred5152

    Joined:
    Dec 18, 2007
    Messages:
    12
    try this out

    textbox3.text = (convert.toint32(textbox1.text) + convert.toint32(textbox2.text)).Tostring();
     
    fred5152, Dec 18, 2007
    #2
    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:
    635
    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:
    527
    Zabron Muyambo
    Oct 27, 2004
  3. thehobbit
    Replies:
    0
    Views:
    3,847
    thehobbit
    Nov 22, 2006
  4. imman

    session from asp to asp.net

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

Share This Page