Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 23rd, 2009, 01:48 PM
Registered User
 
Join Date: Oct 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP/VBscript

I am currently studying with the Open University. I am very much a beginner in programming ASP.

We have been instructed to use the Option Explicit statement to ensure that all variables are declared.

However, i have been using this and getting an error.

Error Type:
Sun ONE ASP VBScript compilation (0x800A0426)
Option Explicit must be the first statement
/~jw22244/Week_4/test.asp, line 2, column 1

This is the code:

<%@ Language=VBScript %>
<% Option Explicit
'*******************************
'* Helloworl1.asp
'*
'* Author: Nick Heap
'* Date: August 10 2003
'* Version: 1.0
'* Description: A dynamic web page
'* using ASP
'*******************************
'declare variables
Dim strGreeting
'assign the string to the variable
strGreeting = "Hello world!"
%>
<html>
<head>
<title> Helloworld Dynamic 1</title>
</head>
<body>
<%= strGreeting %>
</body>
</html>
 
Old October 23rd, 2009, 03:05 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

First of all, you posted to the wrong forum.

This is the ASP.NET forum, and ASP.NET has *NOTHING* to do with ASP or VBScript.

From now on, post in the beginner's ASP forum.

Secondly, you aren't using Microsoft's ASP. You are using a version that orginally ChiliSoft produced and then, when they were bought by Sun, was supported for a SHORT TIME by Sun. The product is no longer sold or marketed by Sun, so you kind of have to work around whatever limitations or differences there are from Microsoft's version.

I used to work at ChiliSoft, but that was long before the version that you are using was created.

The best I can guess is that the SunOne version of ASP is *NOT* recognizing your first line there as a page directive. Since the default language for ASP (even with SunOne) is VBScript, I would just remove that first line.

If that still doesn't work, then the problem *may* be that SunOne expects to see the OPTION EXPLICIT line within its own <%...%> block.

In any case, I guess I'd suggest you change your code to
Code:
<% Option Explicit %>
<%
' *******************************
' * Helloworl1.asp
' *
... rest same ...
And from now on, post in the ASP forum, not ASP.NET, okay?

By the by...ASP is obsolete, even from Microsoft. MS has pretty much abandoned it to let it die a slow death. I hate to tell you that you are wasting your time, but I think you are. You really *OUGHT* to stop learing ASP and learn ASP.NET, instead. The tools for ASP.NET are SO much better, and they are FREE from MS.
 
Old October 23rd, 2009, 03:40 PM
Registered User
 
Join Date: Oct 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP

Hi, thank you for your reply. I apologise for the placement of the post. I am new to this forum. Unfortunately it is the Open University that are teaching us this.

I will try what you have suggested though.

Thank you

James
 
Old October 23rd, 2009, 09:06 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, if you are paying very much for this class, you are getting ripped off. They should NOT be teaching technology that is this out of date. There are very very fiew jobs to be had doing ASP coding, any more. Just a few maintenance and site enhancement jobs. I don't know of anybody doing any new major projects in ASP.
 
Old October 23rd, 2009, 09:17 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, if you are paying very much for this class, you are getting ripped off. They should NOT be teaching technology that is this out of date. There are very very fiew jobs to be had doing ASP coding, any more. Just a few maintenance and site enhancement jobs. I don't know of anybody doing any new major projects in ASP.

Is this the course you are taking?
http://www3.open.ac.uk/study/undergr...urse/tt282.htm#

If so, they are really and truly ripping all you students off. That certificate you get at the end of the 6 courses will be *USELESS* in my opinion. By giving you just the barest introduction to 3 different server technologies (ASP, CF, and PHP) they aren't really giving you enough expertise in anything to go out and get a job. And two of those are obsolescent technologies: ASP and CF. Neither is being used any more for any serious new projects. Sounds to me like the "Open" University is also the "Obsolescent" University.

Well...just learn enough to pass this clas and the next one. At least the PHP class will hopefully teach you stuff that you can use in a real-world job.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Not Able to Login Successfully ASP/VBSCRIPT jdutwell Classic ASP Basics 2 April 4th, 2008 11:26 AM
vbscript in asp.net 2.0 ufdylan ASP.NET 2.0 Basics 3 August 14th, 2007 12:02 PM
converting vbscript to asp willee ASP.NET 1.0 and 1.1 Basics 1 September 8th, 2006 07:36 AM
arithmetic with ASP VBScript dcarroll Classic ASP Basics 2 October 7th, 2005 09:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.