|
-
Jun 25th, 2002, 05:16 AM
#1
Thread Starter
New Member
Newbie Question: Creating file from data in textboxes
I have a form. In that form i have multiple text boxes and i need to create a file from the data entered in these forms. Can someone explain to me how i can go about this. I am new to visual basic so any help would be appreciated.
-
Jun 25th, 2002, 09:53 AM
#2
Registered User
well, in vb.net, there are about a millions ways to do this. you can create .html, .txt, xml, whatever you want. there is a document object model (DOM) that makes everything simple. For example,
VB Code:
Dim Document As New System.IO.FileStream("Document.txt", IO.FileMode.Create, IO.FileAccess.Write)
Dim w As New System.IO.StreamWriter(Document)
a = textbox1.text
b = textbox2.text
c = textbox3.text
w.BaseStream.Seek(0, IO.SeekOrigin.End)
w.WriteLine("Textbox1 = " & a)
w.WriteLine("Textbox1 = " & b)
w.WriteLine("Textbox1 = " & c)
w.Flush()
w.Close()
my preference has been writing data to an html file, and just putting the appropriate tags. and i am just learning xml for large data files, and it has been incredible. anyway, i hope that helps...
jeff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|