-
I moved it to the OPTION EXPLICIT to the top of the page and it works fine (except for me not having your com object installed, of course)
Code:
<%@Language=VBScript%>
<% Option Explicit %>
<html><head><title>Telephone Object Example</title></head>
<body>
<%
Dim objTelephone
set objTelephone = Server.CreateObject("MyTelephone.Telephone")
objTelephone.Color = "Blue"
objTelephone.Material = "Thermoplastic"
objTelephone.Weight = 22
objTelephone.NumberOfKeys = 12
Response.Write "Done"
Set objTelephone = Nothing
%>
</body>
</html>
-
Cool...Is the Language tag at the top of your code required in an asp page? I remember readin' that's its the default, but I'm not sure. Still new to asp. Thanks
-
I don't think its required but you should always include that for the sake of clarity
-
I thought that if you only use one language on your server, you make sure it's set as the server default, and you leave the @language tag out to skip the extra line of code processing.
-
Explictly declaring items in your code actually makes it process faster.
For example: declaring Language, EnableSessionState=False and Option Explicit speed up your output by approximately 5-10% or so.
There was a great article on ASP today about enhancing performance in ASP and they covered this in great deal with benchmarks to prove it. Unfortunately, their site is no longer free, so my bookmark is useless (at least to me,anyways)
http://www.asptoday.com/content/articles/20000113.asp
-
Sucks to Wrox :p
They were so nice before...