|
-
May 17th, 2001, 11:09 PM
#1
Thread Starter
Guru
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>
-
May 17th, 2001, 11:14 PM
#2
PowerPoster
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
-
May 17th, 2001, 11:48 PM
#3
Thread Starter
Guru
I don't think its required but you should always include that for the sake of clarity
-
May 18th, 2001, 07:30 AM
#4
Black Cat
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.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
May 18th, 2001, 10:16 AM
#5
Thread Starter
Guru
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
-
May 18th, 2001, 02:44 PM
#6
Good Ol' Platypus
Sucks to Wrox 
They were so nice before...
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|