Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
1496
The Server.CreateObject Method
Introduction
The Server.CreateObject method can be used to create an
object of a server component. If you are using a component, which is accessed
over and over then you should create the component in the global.asa Application_OnStart
method. That way you will avoid that the component will be loaded again and
again.
Example
The following example creates a server object of the MSXML
DOM. After that it tries to load a file, which doesn’t exist. Therefore it will
just show the message “Could not load file”.
<%
Set xmlDoc
= Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
xmlDoc.async
= false
if
xmlDoc.load(Server.MapPath("server_object_createobject_example1.xml"))
then