Results 1 to 6 of 6

Thread: making text file

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2002
    Location
    india
    Posts
    44

    Post making text file

    i have one text box and submit button in the form. i wnat to ceonvert the text when posted into HTML. although i have made this but how will i save this HTML in the text file under my folder i ma not able to save the converted text into HTML in the file which i will be able to link to that file from the program itself
    eg
    it will create the html file and svae the contents and i will be ale to view the link on next page such as "name.htm" as soon as the file gets created and clicking the file will open a new window with the contents of that text box
    pls hepl me if anybobe can hep .i will hae to shoe this work and if anybody will hepl mne thru coding then it wiill be fine as i have to show by today
    rajender

  2. #2
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    Do you mean that you want to create a text file on the Server everytime someone submits a form?

    If so you can use the FSO.

    Whatever directory you use to store this files must allow reading & writing by the IUSR_MachineName account (Make sure you disable all other permissions for this account on this folder!)

    VB Code:
    1. Dim txtString, fso, txtFile
    2. txtString= "Some Text String"
    3. Set fso = server.CreateObject("Scripting.FileSystemObject")
    4. Set txtFile = fso.CreateTextFile("c:\Temp\WebPages\page1.htm", True)
    5. txtFile.Write (txtString)
    6. txtFile.Close

  3. #3
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    there is a tutorial and info on manipulating Text files here: http://www.4guysfromrolla.com/ hope this helps

  4. #4
    PWNettle
    Guest
    I'm thinking that if you ask the same question 3 or more times you'll get a better response.

    Paul

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2002
    Location
    india
    Posts
    44

    your query

    no actually i want to svae the contents of text box in the html file whenever i submit the form it will store the contents in the html file and that html file will get stored in the specified directory
    rajender

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by PWNettle
    I'm thinking that if you ask the same question 3 or more times you'll get a better response.

    Paul
    I second that, its a little bit annoying if someone posts the same question again and again.

    Rajender, rather then asking some one to do your course work ask specific question, we all here would be glad to help.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width