Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

Share tech news, updates, or what's on your mind.

Sign up to Post

I need to capture the exact time and write it to a sql server db via a classic asp web page.  I have a page that does that now...sort of.  It uses the Now() asp function.  The problem is that, if the internet happens to be slow where we are, by the time the command goes to the server, the time may not be as precise as we need.  Is there a way to capture that time client side (using javascript for instance) and then write it to the server, all with one button submit?

Thanks in advance for your help.
CompTIA Cloud+
LVL 13
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Hello Experts,

Recently I have had reports that customers can make $0 Value  purchases with the default 1111 promo from

I realize that now if you leave all passengers as 0 you can still continue, I will fix this. However, real purchases with >0 passengers (not just infants) are going through with $0 being charged.

Is anyone able to make such $0 purchases? If so, I would greatly appreciate how to replicate/fix. I would also appreciate if I can get  the confirmation number they get, so that I can void it.

Since this is coming from the general public, I do not have the type of browser used, etc. As you'll also note this is a legacy app in Classic ASP, but if needed, I was hoping if someone can give e a pointer on how to get and store the client (browser) info,  so I can add it to a field for analysis? I'm  drawing a blank, would this be a part of the equivalent of $_SERVER, or js header()?

Any help will be appreciated.
I have a classic asp site that currently creates a plain text file from a database.  The end user then has to turn it into a *.csv file.  Is there a way to create the *.csv file directly?

Here is how I create the file:
Set fs=Server.CreateObject("Scripting.FileSystemObject")
sFileName = "C:\inetpub\h51web\gopherstateevents\dwnlds\athl-net_" & sMeetName & "_" & Year(dMeetDate) & ".txt"
Set fname=fs.CreateTextFile(sFileName, True)

fname.WriteLine(iDist & " " & sUnits)


fname.WriteLine("PLACE" & vbTab & "FIRST" & vbTab & "LAST" & vbTab & "GENDER" & vbTab & "GR" & vbTab & "TEAM" & vbTab & "TIME")
For i = 0 to UBound(RsltsArr, 2)
    fname.WriteLine(i + 1 & vbTab & RsltsArr(0, i) & vbTab & RsltsArr(1, i) & vbTab & RsltsArr(2, i) & vbTab & RsltsArr(3, i) & vbTab & RsltsArr(4, i) & vbTab & RsltsArr(5, i))

Set fname=nothing
Set fs=nothing

Open in new window

Hi all, I am not sure how to describe this, but I will try my best.

What I would like to do is show all dates set between 2 dates.

EG - Dates between 8/10/2019 & 21/10/2019 (will vary from each itinerary given to clients)

Hopefully this as good as an explanation as needs to be :P

I am coding in ASP Classic and I have tried a few things, just do not work and make a mess, so I need some fresh experienced eyes to put me on the right path
Hi Guys
is there a way to block access to a single web page by IP?
 how is this done in iis 7.5 or above?
Solution needs to work in  Classic ASP!
How secure is your solution?

i have a user control uc_DocumentDate that contains a textbox ex:txt_Date
and inside the user control  i am doing the below $('#<%=txt_date.ClientID %>').change(function () {}
where inside i am filling hiddenfield hdn_1.value = "test"

Now, i have a web form where i am dragging and dropping the user control inside
and i am doing the below
try {
                var m_uc_DocumentDate = document.getElementById("<%=uc_DocumentDate.FindControl("txt_Date").ClientID%>");
                var m_uc_DocumentDate_ToSql = document.getElementById("<%=uc_DocumentDate.FindControl("hdn_1").ClientID%>");
                $("#" +"change", function () {
            } catch (e) {


Open in new window


after debugging the case i found that on change of thh form is fired before on change of thh user control
howcan i make the onchange of the user control  before on change of teh user control inside teh form
I have a datetime value that I'd like to specifically format like:

Thursday, May 19, 2019 1:00 PM

The standard FormatDateTime function doesn't fit since it either uses 24-hour format, or includes seconds.

Any suggestions would be appreciated.
Hello.  Is there a way to increase the time that a classic asp page is active for longer than the default IIS setting (which I think is 20:00)?  I have a page that I would like to not time out for about 3:00:00 but I really don't want that duration for the entire site.
I'm looking for a more attractive calendar to use on my classic asp site.  Here is my "home brew" version.  Looking for something that uses bootstrap 4
How can I get just time of day (24 hour format) from the Now() function in classic asp?  For instance, it currently generates 8/31/2019 6:46:11 PM and what I need is 18:46:11

Thanks in advance.
C++ 11 Fundamentals
LVL 13
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

I have been trying to get more efficient by using sql.execute rather than opening and closing a recordset.  However there are a few times when I want to know how many records there are.  For intance, in the link below it says there are -1 finishers in that particular race.  How can I get the actual number without using rs.RecordCount (which can only be done by opening the recordset, correct?).  Or is this a case where opening the recordset is the best way to go?

Thanks in advance!
Using Classic ASP, VB Classic, and MS SWL Server:  Apologies in advance because I have posted this before but the solutions haven't "worked".  User error maybe but I need to speed up some queries.  For instance, this should be an execute but it throws an error if there is no data returned (I would like it to return a null value or 0 if no data is returned):
    Set rs = Server.CreateObject("ADODB.Recordset")
    sql = "SELECT MeetClass FROM MeetTeams WHERE MeetsID = " & lThisMeet & " AND TeamsID = " & lTeamID
    rs.Open sql, conn, 1, 2
    lMeetClass = rs(0).Value
    Set rs = Nothing

Open in new window

I need the same solution when populating an array with GetRows.  Here is an example:  If this recordset returns no rows, then how do I dim the array?  If no records are returned I need it to Dim as MeetArray(3, 0) so it doesn't thow an error on the page when listing out meets that don't exist.  I've been given a solution that involved If rs.BOF = rs.EOF Then... but then it never returns any results.
Dim MeetArray
sql = "SELECT MeetsID, MeetName, MeetDate FROM Meets WHERE MeetDate <= '" & Now() & "' AND ShowOnline = 'y' "
sql = sql & "AND Sport = '" & sSport & "' ORDER BY MeetDate DESC"
Set rs = conn.Execute(sql)
MeetArray = rs.GetRows()
Set rs = Nothing

Open in new window

Big event with lots of participants and folks hitting my website for results in about three weeks.  Any help would be much appreciated.
Hi Experts,
I would like to display content on a web page based by the logged in user's computer name.
If computer name is 'ABC123' then the web page displays 'XXX Content'
If computer name is 'XYZ123' then the web page displays 'WWW Content'
If computer name is not in the database then the web page displays 'You are not registered'

The computer names are retrieved from a SQL Server database.
Is there any script that can capture the visitor's computer name and display the content accordingly?
I am using classic ASP.

Thank you for your help.
Have problem running the integration test on ASP Core 3.0 on my project. Any idea ?

I am trying to set up a VPS but this came with no configuration at all, i am trying to set up the iis at the moment and i am struggling

its on a windows 2019 datacenter server, with IIS 10

the error i am getting is "can not verify access to path " (microsoft say this is just a warning and will be fine at run time)

however it will not process  server side includes as it cant find the folder, unless i put in the full path in the Include tag, this isnt an option as it would mean to much editing of the code for each instance

<!-- #INCLUDE virtual="/cmms/common/db_obj.asp" -->  Doesnt work

<!-- #INCLUDE virtual="harbourside/cmms/common/db_obj.asp" --> does work

server side include is configured in iis , and set to true in the asp module

I have spent days trying to figure this out, i cant find much help on iis 10 in google
We need to build a 64 bit ASP MVC app that can use 64 bit powershell. This is proving to be much harder than we thought. We have successfully built our app in a console using 64 bit debug properties, however when we try to build a new MVC 64bit project, we are getting error upon error.

What we are trying to accomplish is having a self service web page where a user can view an action and click a button. That button will execute a powershell script and provide the user confirmation the task was completed. Something like: [copy file to FTP]. The user clicks the button the PoSh gets executed copying the file to the correct location the user is not aware of, then the user gets output on the webpage stating the file copy was a success.

I feel we are missing something simple here. Does anybody out there have experience building something like this and if so can they point me to a comprehensive web article or book that will show us how to get a 64 bit MVC app working with the following assemblies added:

using System.Management.Automation;
using System.Management.Automation.Runspaces;
using Microsoft.FailoverClusters.PowerShell;

Open in new window

I want to create cookies for a Remember Me functionality on

Here is how I create the cookie:
            If Request.Form.Item("remember-me") = "on" Then
                Response.Cookies("user_name") = sUserName
                Response.Cookies("password") = sPassword
            End If

Open in new window

Here is where I retrieve it:
sUserName = Request.Cookies("user_name")
sPassword = Request.Cookies("password")

Open in new window

And here is how I attempt to place it in the appropriate form item values:
                                <fieldset class="form-group position-relative has-icon-left">
                                    <input type="text" class="form-control form-control-lg input-lg" 
                                    name="user_name" id="user_name" placeholder="Your User Name" required=""
                                    <div class="form-control-position">
                                        <i class="icon-head"></i>
                                <fieldset class="form-group position-relative has-icon-left">
                                    <input type="password" class="form-control form-control-lg input-lg" 
                                    name="password" id="user-password" placeholder="Enter Password" required=""
                                    value="<%=sPassword%>" aria-invalid="false">
                                    <div class="form-control-position">
                                        <i class="icon-key3"></i>

Open in new window

It does not appear to be working.  Any help would be much appreciated.
Hi Guys
I am running an eCommerce website using Microsoft  platform
My website is hosted on a  VPS  ( Plesk )
i am using  Classic Asp
I lam looking to  prevent  remote access to a  website folder  ( My  Image folder)
What are my alternatives?
Any help is appreciated
I have a list of jobs on a page, you can click through on an individual list item to a printer friendly page and print the page at the moment, what i would like to be able to do is have a check box next to each list item to be able to select the list items to be printed and create a cue to be processed in the background and sent to the printer, i dont want the page to hang while it processes the request...

Site is written in ASP Classic
Exploring ASP.NET Core: Fundamentals
LVL 13
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

I need to be able to print off worksheets from my web pages, but i dont want the page titles and urls to be printed at top and bottom of the page, is there a way to stop this information being printed

the site is built in ASP classic,  will  use jquery/javascript to accomplish this if that is the way to go

Alternatively can you send options to the print preview screen to remove these from the page instead of having to change them in the print preview screen
On my classic ASP page I have a textarea which is populated from an SQL Server table.
The content of the textarea shows the html tags like this: My text<br/>more text<br/>more <b>text</b>
Is there a simple solution that prevents the html tags from being displayed and the text appears formatted in the textarea instead?
We are currently running a Classic ASP 32 bit application with an SQL server as backend.
We are going over the ISAPI Extensions on IIS. We are not sure which ones are requiered and which ones can be disabled.

Any pointers would be great.
My browser is displaying "friendly" http errors when an ASP Classic page experiences an error.

Previous version of windows and IE would display messages like:

Error in line 100, divide by zero

however, now that I have WIn10 and the latest version of IE, Edge, and Chrome, the only message I get is:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Previously I could go to the Advanced setup of IE and uncheck Show Friendly HTML errors to see detailed errors.  I have not idea if that option was also available with other browsers.

Can someone help?  I think this may have something to do with iis.
At the moment i am creating an email in html and sending it out, i would like this to be a pdf as this will need to be printed is there a way to convert the created HTML page into a pdf ?

EDIT: i know about some tools that will do this in php but i am running a windows server configured for ASP and cannot run php..

the email creation page is below

Dim myEqp2, myEmp2, myPri2, thisSQL

Dim myWoList2

	Set myWoList2 = New cWoList
	Call myWoList2.GetTodayWorkOrders

for each MyWo in myWoList2.WorkOrders.Items

	Set myEqp2 = New cEquipment
	Set myEmp2 = New cEmployee
	set myPri2 = New cWopri
	'Set mysEmp = New cEmployee
	'set myvEmp= New cEmployee


session("woid") = MyWo.WoID
Dim myWo1
Set myWo1 = New cWorkOrder

if (session("woid")<>"" ) Then
end if

if (session("woid")<>"" ) Then
	Dim myPri1, myEmp1, myEqp1, myEmailSent1
	set myPri1 = new cWopri
	set myEmp1 = new cEmployee

	set myEqp1 = new cEquipment

end if

						      if myWo1.ActCompDate = "01/01/1900" then
								myWo1.ActCompDate = ""
						      end if

if myWo1.emailSent = 0 then

Set Mail = Server.CreateObject("SMTPsvg.Mailer") 
Mail.FromName = "name" 
Mail.FromAddress= "email" 
Mail.RemoteHost = "smtp" 

Open in new window

Hi there, I want to create a counter for my website that is unique for cookies...

I am unsure on how to do this, so I will need some guidence...

My Idea of a cookieID would prefer to be...

the date in reverse and then the order of the visitor of the day, first visitor gets number 1, second number 2, etc.

How would I be able to create the counter without a database?






Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.