web 2.0

ASP Server.CreateObject() - Server Object

ASP Server.CreateObject() - Application Object Creates a server instance of a COM object identified by the object’s programmatic identifier (ProgID).

ShotDev Focus:

- Create COM object.

Example

asp_server_createobjet.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim Fso,Drive
Set Fso=Server.CreateObject("Scripting.FileSystemObject")
Set Drive=Fso.GetDrive("C:")
Response.Write("Drive " & Drive & " = " &FormatNumber((Drive.TotalSize)/1024/1024/1024,0)&" GB")
set Fso=nothing
set Drive=nothing
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run

http://localhost/myasp/asp_server_createobjet.asp

Screenshot

ASP & Server.CreateObject()

.

.

.

Download this script.

Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.