Click to See Complete Forum and Search --> : Beginner: VBScript won't display time


davelds
April 22nd, 2003, 01:42 PM
This is an ASP question, not ASP.NET. I hope it's OK to post here--I cannot find a plain ASP forum.

I'm brand new to ASP, and I cannot get VBScript to display anything in my simple ASP page. The following script only displays "Hello" (I've embedded spaces in the tags so it would not be interpreted as HTML in this post):

< % @ Language = "VBScript" % >
< html >
< body >
Hello
< %=World!% >
< /body >
< /html >

I'm using IE 6.0 on XP Professional with IIS 5.1. I have this on my own machine under C:\InetPub.

I asked one of my co-workers to try it and it displays fine for him (he copied it to his machine)

Thanks!

Dave

fizch
April 30th, 2003, 02:03 PM
I would think that you need to enclose World! in quotes. That system is probably seeing that as an undefined variable and thus creating the variable and putting nothing in it (the default value). So your code should look like this:


< % @ Language= "VBScript" % >
< HTML >
< BODY >
Hello
< % = " World!" % >
< / BODY >
< / HTML >