HTML edit Vb.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ailon10@gmail.com

    #1

    HTML edit Vb.net

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


    how do i edit it ?
    tnx

  • Pascal

    #2
    Re: HTML edit Vb.net



    --
    bonjour

    I think with a streamwriter...

    Ressource pédagogique SC@LPA.



    Comment

    • ailon10@gmail.com

      #3
      Re: HTML edit Vb.net


      Pascal wrote:
      --
      bonjour
      >
      I think with a streamwriter...
      >
      http://www.scalpa.info

      can you give me expamle plz ?

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: HTML edit Vb.net

        Ailon,

        Maybe this one can help you



        I hope this helps,

        Cor

        <ailon10@gmail. comschreef in bericht
        news:1151857335 .113057.306690@ m79g2000cwm.goo glegroups.com.. .
        well i want to edit simple html file :
        first i create it :
        system.io.file. create("C:\file name.html")
        what i shold do to edit it i mean i want to insert into it
        <html>
        <head>
        <titleTextTextT ext </title>
        </head>
        <body>
        TextBox1.Text
        </body>
        </html>
        >
        >
        how do i edit it ?
        tnx
        >

        Comment

        • iwdu15

          #5
          Re: HTML edit Vb.net

          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.ht ml", FileMode.Create ,
          FIleAccess.Writ e)

          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

          Comment

          • ailon10@gmail.com

            #6
            Re: HTML edit Vb.net


            iwdu15 wrote:
            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.ht ml", FileMode.Create ,
            FIleAccess.Writ e)
            >
            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
            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 ?

            Comment

            Working...