Results 1 to 2 of 2

Thread: urgent

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2002
    Location
    india
    Posts
    44

    Post urgent

    i have one text box and submit button in the formin an ASP page. i want to convert the text entered in the textbox into HTML after i click on submit button. in ASP although i have made this but how will i save this converted HTML in the text file(HTML) under my folder. i am 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

    pls help me if anybobe can hep .i will hae to show 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
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276
    Hi,
    Use this code. This will create a html file with the contents in your text box...
    Code:
    <%
    	Set fso = CreateObject("Scripting.FileSystemObject")
    	szContents = Request.form("MyText")
    	szFile = "C:/Test.htm"
    	If(szContents<>"")then
    		fso.OpenTextFile(szFile, 2, True,false).Write szContents
    	end if
    %>
    <form name=MyForm method=post action=try.asp>
    	<input name=MyText type=text value="">
    	<input type=submit value=Save>
    </form>
    Get back if u have any issues...

    - Jemima.

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