raj patel
July 10th, 2001, 10:46 AM
I'm new to asp and don't know much about it.
Has anybody of you lot done some VB Scripting inside an ASP.
I've written the following piece of code in VB and it works ok but when I transfer it to the ASP it falls over in actual fact it doesn't even compile.
VB Code that works looks like this
Option Explicit
Private Sub Command1_Click()
Static runNo As Integer
'Declare a filename variable
Dim fileName As String
fileName = "C:\\tempfile.txt"
'Open the fileName to be written to
Open fileName For Output As #1
Lock #1, 1
runNo = runNo + 1
Print #1, "Hello World - Look I'm writing to a file - " + CStr(runNo)
Unlock #1, 1 ' Unlock the file
Close #1 ' Close the file
End Sub
I transferred the above code to my ASP document and placed it within the head and /head sections but it doesn't work any ideas?
Mant thanks in advance
Raj
Has anybody of you lot done some VB Scripting inside an ASP.
I've written the following piece of code in VB and it works ok but when I transfer it to the ASP it falls over in actual fact it doesn't even compile.
VB Code that works looks like this
Option Explicit
Private Sub Command1_Click()
Static runNo As Integer
'Declare a filename variable
Dim fileName As String
fileName = "C:\\tempfile.txt"
'Open the fileName to be written to
Open fileName For Output As #1
Lock #1, 1
runNo = runNo + 1
Print #1, "Hello World - Look I'm writing to a file - " + CStr(runNo)
Unlock #1, 1 ' Unlock the file
Close #1 ' Close the file
End Sub
I transferred the above code to my ASP document and placed it within the head and /head sections but it doesn't work any ideas?
Mant thanks in advance
Raj