Velocity Reviews

Velocity Reviews (
-   Software (
-   -   C# (

ahsan2011 04-18-2007 03:50 AM

hi i m started learnin 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

Mr_helper 05-12-2007 08:41 AM

use this code

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


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

abdul 06-07-2007 07:32 AM

how to include user-defined class in asp.net2005
i want to know how to include a class in 2005 framwork 2.0

fred5152 12-18-2007 08:57 PM

if you wan to use the class in the whole application better define your class in the app_code folder

ousrah 12-26-2007 09:53 AM


val(eg12.text) + 11

thas well go

All times are GMT. The time now is 03:25 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.