Writing ASP code in to file by using FileSystemObject 
Author Message
 Writing ASP code in to file by using FileSystemObject

Hello,
I am trying to write dynamically generated asp code in to different asp
page(like new.asp) by using Scripting.FileSystemObject but problem I am
Facing is I am not able to write? this code into new.asp

set df1=fso.OpenTextFile(Session("filename"),2)
?

con=server.CreateObject(""ADODB.Connection"")con.Open(""accountantplus"")
set rs=con.Execute(""select * from members where
login='"&<%=login%>&"'")
?

The problem i am facing is I am not able to Write special characters
like (<% %> and " etc).

How to write special character in to file by using FileSystemObject 's
Write method.

thank you
dheeraj



Tue, 15 Jan 2002 03:00:00 GMT  
 Writing ASP code in to file by using FileSystemObject
Use the chr() function
" = 34
% = 37
< = 60

Quote:
> = 62

so "<% 'VB Comment %>"
becomes chr(60) & chr(37) & " 'VB Comment " & chr(37) & chr(62)
Quote:

>Hello,
>I am trying to write dynamically generated asp code in to different asp
>page(like new.asp) by using Scripting.FileSystemObject but problem I am
>Facing is I am not able to write this code into new.asp

>set df1=fso.OpenTextFile(Session("filename"),2)


>con=server.CreateObject(""ADODB.Connection"")con.Open(""accountantplus"")
>set rs=con.Execute(""select * from members where
>login='"&<%=login%>&"'")

>The problem i am facing is I am not able to Write special characters
>like (<% %> and " etc).

>How to write special character in to file by using FileSystemObject 's
>Write method.

>thank you
>dheeraj



Tue, 15 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Writing images into a file using FileSystemObject

2. writing images into a file using FileSystemObject

3. Writing images into a file using FileSystemObject

4. writing images into a file using FileSystemObject

5. Writing ASP code to file?

6. Writing ASP code to file?

7. writing files/directories using Com objects / with asp

8. REPOST writing files/directories using Com objects / with asp

9. Writing a file out to the response object using asp

10. Using ASP to let a webuser write text file on the server

11. Using FileSystemObject to Write to a Com port

12. Sharing problem writing to MDB file using WORD VBA code

 

 
Powered by phpBB® Forum Software