Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-04-2007, 08:12 PM   #1 (permalink)
In The Zone
 
william's Avatar
 
Join Date: Feb 2006
Posts: 217
Default read from textbox


friends i am doing C#. I want to know how to get or store data entered by the user in a text box.
suppose you store data entered by the user in one variable and then use that variable to display the message and the same text.
pls help
__________________
The secret of creativity is knowing how to hide your sources.

Albert Einstein
william is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 07-04-2007, 08:48 PM   #2 (permalink)
CG Artist
 
gaurav_indian's Avatar
 
Join Date: May 2006
Location: New Delhi,India
Posts: 1,462
Default Re: read from textbox

Suppose you get the value(number) from the user in textbox1.text
then declare a variable

int a;

a=int.Parse(textbox1.text);

also place a label named label1 on the form
then
label1.text=a.toString();

I hope this will help.
gaurav_indian is offline  
Old 07-04-2007, 09:44 PM   #3 (permalink)
Human Spambot
 
Join Date: Nov 2004
Location: Madurai
Posts: 2,349
Default Re: read from textbox

^^ Note that the command label1.text=a.toString() should be placed within event handler for textbox text change... On the other hand, you can also write for focus leaving the textbox...

Arun
sakumar79 is offline  
Old 07-04-2007, 10:13 PM   #4 (permalink)
CG Artist
 
gaurav_indian's Avatar
 
Join Date: May 2006
Location: New Delhi,India
Posts: 1,462
Default Re: read from textbox

Or you can write this code on Button_click event if you want to display it on clicking the button.
gaurav_indian is offline  
Old 08-04-2007, 11:38 AM   #5 (permalink)
In The Zone
 
william's Avatar
 
Join Date: Feb 2006
Posts: 217
Default Re: read from textbox

thanks every one.
__________________
The secret of creativity is knowing how to hide your sources.

Albert Einstein
william is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
combo drive problem read some dvd dosen't read others q4_abhi Hardware Q&A 4 03-04-2007 05:09 PM
HELP:-->DVD is Not read but CD is read in DVD ROM in RedHat8 pr@k@sh QnA (read only) 3 28-03-2005 01:21 PM
how do U read this? yehmeriidhain QnA (read only) 29 02-03-2005 09:05 PM

 
Latest Threads
- by Tenida
- by Charan
- by abhidev
- by Sujeet
- by Sarath

Advertisement




All times are GMT +5.5. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2