469,315 Members | 1,573 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

VBScript won't run..

101 100+
I hope I'm in the right category, and assume that VBScript is a part of asp.net.

Anyways, here is the code that will not run:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5.  
  6. <script type="vbscript">
  7.  
  8. document.write("Hello from VBScript!")
  9. </script>
  10.  
  11. </body>
  12. </html>
I have no idea how to get this to work in IIS. I feel like I've tried everything. The html will display, but the script won't. I've checked the event logs too, with no errors.

I've even named the document with ".aspx" and ".asp" and ".html" extensions
Jun 3 '08 #1
6 2712
zensunni
101 100+
I realize now that VBScript is a CLIENT SIDE script, meaning it was only intended to run in internet explorer. Basically, it's just Microsoft's answer to javascript.

Please correct me if I'm wrong.
Jun 3 '08 #2
vikas251074
198 100+
Hello
Any other script is working or not?

Thanks and regards,
Vikas
Jun 4 '08 #3
DrBunchman
979 Expert 512MB
I realize now that VBScript is a CLIENT SIDE script, meaning it was only intended to run in internet explorer. Basically, it's just Microsoft's answer to javascript.

Please correct me if I'm wrong.
VBScript can be a client side script but it can also be a server side scripting language if used between server tags (<% %>) on a page with a .asp extension.

Pages with a .aspx extension are ASP.NET pages and are written using an Object Oriented language such as VB.NET or C#.

Does this make sense?

Dr B
Jun 4 '08 #4
vikas251074
198 100+
Yes sir, it makes a lot of sense.

Thanks and regards,
Vikas
Jun 4 '08 #5
zensunni
101 100+
I'm not sure I understand exactly. I know that anything between <%%> brackets will run asp like so:

Expand|Select|Wrap|Line Numbers
  1. <% response.write "Hello from ASP!" %>
If I wanted to write VBScript server side, would I do this:

Expand|Select|Wrap|Line Numbers
  1. <%
  2. <script type="vbscript">
  3. document.write("Hello from VBScript!")
  4. </script>
  5. %>
Or, does asp run certain VBScript syntax/functions?

Also, how would a hello world document written in C#/VB look like in aspx? One thing I've never really understood is how to tag C#/VB code into a document.
Jun 24 '08 #6
jeffstl
432 Expert 256MB
This is server side (file must be .asp for the server to know to compile and execute using the asp.dll)
Expand|Select|Wrap|Line Numbers
  1. <% response.write "Hello from ASP!" %>

This is client side (code that executes in the browser) File can be any file type really, but this code will be browser dependant (only certain browsers will be able to run this)

Also you don't need the <% %> for this code. Those mark ups are for ASP server side code only
Expand|Select|Wrap|Line Numbers
  1. <script type="vbscript">
  2. document.write("Hello from VBScript!")
  3. </script>
  4.  
Jun 24 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Dave Thomas | last post: by
reply views Thread by SLE | last post: by
4 posts views Thread by KevinGPO | last post: by
2 posts views Thread by Andrew Poulos | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.