HTML edit Vb.net

  • Thread starter Thread starter ailon10
  • Start date Start date
A

ailon10

well i want to edit simple html file :
first i create it :
system.io.file.create("C:\filename.html")
what i shold do to edit it i mean i want to insert into it
<html>
<head>
<title> TextTextText </title>
</head>
<body>
TextBox1.Text
</body>
</html>


how do i edit it ?
tnx
 
well you can just have a multi ;line text box or a richtext control and have
the user tpye in

<html>
<head>
......


then, when you want to write it to a file

DIm fs as new IO.FileSTream("C:\MyHTMLDoc.html", FileMode.Create,
FIleAccess.Write)

DIm sw as new IO.StreamWriter(fs)

then just say, to write the file

sw.WriteLine(me.txtHTML.text)

that will write the complete text as you see it

dont forget to close your streams by calling the fs.close and sw.close methods
 
iwdu15 said:
well you can just have a multi ;line text box or a richtext control and have
the user tpye in

<html>
<head>
.....


then, when you want to write it to a file

DIm fs as new IO.FileSTream("C:\MyHTMLDoc.html", FileMode.Create,
FIleAccess.Write)

DIm sw as new IO.StreamWriter(fs)

then just say, to write the file

sw.WriteLine(me.txtHTML.text)

that will write the complete text as you see it

dont forget to close your streams by calling the fs.close and sw.close methods

i dont want that user will wirte that i want that program wirte by user
select ... i mean that the program will wirte the file for user he/she
just need to click on the button "wirte"
so
i just want the program will wirte
* some text *
to the filename.html file
thats possible ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top