file Writing problem

Results 1 to 3 of 3

Thread: file Writing problem

  1. #1
    Join Date
    Dec 1969

    Default file Writing problem

    I want to write to a file named as default.asp<BR>which should look like<BR>&#060;%<BR>session("URL")=abc<BR>%&#062;<B R>the code for this one should be<BR>dim objFSO,myFile<BR>set objFSO=server.CreateObject("Scripting.FileSystemOb ject")<BR>set myFile=objFSO.CreateTextFile("C:Tempdeafult.asp",t rue)<BR>myFile.WriteLine("%&#062;")<BR>myFile.Writ eLine("session("URL")=abc")<BR>myfile.WriteLine("% " & "&#062;")<BR>This code should work buy the poblem is that when you try to give double quots in your string: ASP interpreter will give you an error<BR>Any solution!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: file Writing problem

    if you&#039d read the post i gave you yesterday, you&#039d notice that i doubled my double quotes. that&#039s how you escape quotes in VBScript/VB<BR><BR>myFile.WriteLine("session(""URL"")=abc") <BR><BR>j

  3. #3
    Priyan Meledath Guest

    Default RE: file Writing problem

    Use CHR(34) for double Quotes.<BR>myFile.WriteLine("session(" & CHR(34) & "URL" & CHR(34) & ")=" & CHR(34) & "" & CHR(34))

Posting Permissions

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