Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Software (http://www.velocityreviews.com/forums/f6-software.html)
-   -   C# asp.net (http://www.velocityreviews.com/forums/t498027-c-asp-net.html)

ahsan2011 04-18-2007 03:50 AM

C# asp.net
 
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

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();

Or

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 asp.net 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

put

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.