how to add the text in text boxes.

Reply

Join Date: May 2009
Posts: 52
Reputation: mohankumar554 is an unknown quantity at this point 
Solved Threads: 0
mohankumar554 mohankumar554 is offline Offline
Junior Poster in Training

how to add the text in text boxes.

 
0
  #1
Aug 26th, 2009
hi,

i want to add the text in one text boxto another text in another textbox. i mean ,we enter value 5 in textbox1 and enter value 10 in textbox2 and finally when we click on button the result(15) will be displayed in textbox3. how it is possible. can u tell me the solution . i am using the asp.net and ms sql server 2000 .
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 164
Reputation: dnanetwork has a little shameless behaviour in the past 
Solved Threads: 24
dnanetwork's Avatar
dnanetwork dnanetwork is offline Offline
Junior Poster

Re: how to add the text in text boxes.

 
0
  #2
Aug 26th, 2009
r u asking us simple calculation..

TextBox3.Text = (int.Parse(TextBox1.Text.toString()) + int.Parse(TextBox1.Text.toString())).toString();

hope that works for you....

tata docomo..
Mark the thread as resolved if your problem gets resolved :)
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 76
Reputation: kameswari is an unknown quantity at this point 
Solved Threads: 15
kameswari kameswari is offline Offline
Junior Poster in Training

Re: how to add the text in text boxes.

 
0
  #3
Aug 26th, 2009
hi use the following code..

[code]
int res=0;
res = Convert.ToInt32(TextBox1.Text) + Convert.ToInt32(TextBox2.Text);
TextBox3.Text = res.ToString();
[\code]

Let me know your comments. If It solves ur problem mark it as solved.
Last edited by kameswari; Aug 26th, 2009 at 5:48 am. Reason: some more code
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 164
Reputation: dnanetwork has a little shameless behaviour in the past 
Solved Threads: 24
dnanetwork's Avatar
dnanetwork dnanetwork is offline Offline
Junior Poster

Re: how to add the text in text boxes.

 
0
  #4
Aug 26th, 2009
Originally Posted by kameswari View Post
hi use the following code..

[code]
int res=0;
res = Convert.ToInt32(TextBox1.Text) + Convert.ToInt32(TextBox2.Text);
TextBox3.Text = res.ToString();
[\code]

Let me know your comments. If It solves ur problem mark it as solved.

sorry kameshwari i was in the hurry..

so forgot to use [code] Tag..
Mark the thread as resolved if your problem gets resolved :)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum


Views: 254 | Replies: 3
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC