NEED HELP URGENT

Author Message
opela

  • Total Posts : 9
  • Scores: 0
  • Reward points : 0
  • Joined: 12/16/2008
  • Status: offline
NEED HELP URGENT Tuesday, December 16, 2008 9:15 AM (permalink)
0
Below is vbscript that I am trying to write. I am trying to write informationfrom a text file and write it in HTML.
The logic here is open the file read it and then write it. I keep getting errors associated with FileStream and Streamreader. Do I need to import anything? If so where do I do so? Please help I'm in desperate need!!
 
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>

<script type="text/vbscript">
Dim FS As FileStream
Dim SR as StreamReader
FS = new FileStream("d:\data\pelao\My Documents\text.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write)
SR = new StreamReader(FS)
while(SR.Read != -1)
{
 read contents of file and write html using
 document.write
}

</script>
 
</body>
</html>
 
#1
    DiGiTAL.SkReAM

    • Total Posts : 1259
    • Scores: 7
    • Reward points : 0
    • Joined: 9/7/2005
    • Location: Clearwater, FL, USA
    • Status: offline
    RE: NEED HELP URGENT Tuesday, December 16, 2008 10:05 PM (permalink)
    0
    looks to me like you are trying to run .Net code instead of vbscript.
    .Net <> vbs
    "Would you like to touch my monkey?" - Dieter (Mike Meyers)

    "It is better to die like a tiger, than to live like a pussy."
    -Master Wong, from Balls of Fury
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9