Hi
I have created awebpage thru which i create a file and write some data into it.Problem is i couldnt able to create a file.can anybody check the code and find out the error
It is in VBSCRIPT.
<html>
<title>
Writing a file
</title>
<head>
<script language="VBScript">
sub cmdWrite_OnClick
dim filesys, demofile, txtstream
set filesys = CreateObject ("Scripting.FileSystemObject")
set demofile = filesys.CreateTextFile ("c:\hellotest.txt", true)
set demofile = filesys.GetFile("c:\hellotest.txt")
set txtstream = demofile.OpenAsTextStream (2, -2)
txtstream.Write "This will overwrite any text already in the file."
txtstream.Close
End Sub
</script>
</head>
<body>
<form name="frmExe">
<input type="Submit" Name="cmdWrite" value="Click">
</form>
</body>
</html>