Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C Sharp only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C Sharp
save textbox value
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
siddhanta
New Member
Join Date:
Oct 2009
Posts:
33
#1
save textbox value
Nov 1 '09, 07:17 PM
hi,
i wanna save the textbox values in notepad(.txt). can u plz guide me how to proceed
relikangus
New Member
Join Date:
Nov 2009
Posts:
3
#2
Nov 1 '09, 07:31 PM
you mean you wanna save the text that is in the text-box into a (.txt) file that may be opened in notepad?
Comment
Post
Cancel
siddhanta
New Member
Join Date:
Oct 2009
Posts:
33
#3
Nov 1 '09, 07:35 PM
yup exactly
there are 4 textboxes. and i want to save the values of all textbox in a single notepad.
Comment
Post
Cancel
relikangus
New Member
Join Date:
Nov 2009
Posts:
3
#4
Nov 1 '09, 07:45 PM
ok
1. make sure you add the using System.IO in the directives at the top. you need that to do reading/writing to files on the systm
String theData = textbox1.Text;
FileStream aFile = new FileStream("myT extFile.txt", FileMode.OpenOR Create);
StreamWriter sw = new StreamWriter(aF ile);
sw.WriteLine(th eData);
sw.close();
i'm assuming that the text box is called textbox1
Last edited by
relikangus
;
Nov 1 '09, 07:45 PM
.
Reason:
clarifiation
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment