We help IT Professionals succeed at work.






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.

Experts -

I need a countdown timer in classic asp from 10 seconds to 0. (Without page refresh)

In a DIV  (<p>)- I will need to say "Kindly allow 10 seconds for Request creation..., " Here the 10 should count down to 0. and Once it becomes 0, it should change the <p> text to "Request created".

I understand there are alot of timers available in js/jquery but my ask is unique and peculiar and i dont want the page / body to refresh every 10 seconds or so.

Kindly help.
Hi there.

I'm working on a recordset that is supposed to pull 20 records a time from thousands of records. Why? Do make an overview list load fast. So far I had a query pulling all records, and that takes 15 seconds to load. I use classic asp and VB.
I found a well working example how to load the data and navigate in the loaded data, and it loads fast enough. Now I have to implement the search options I used to have with parameters from user input. And I have some trouble making the script work. I hope you can help. I probably made some syntax errors. Here's my code:

    'Set how many records per page we want
    Const NumPerPage = 20

    'Retrieve what page we're currently on
    Dim CurPage
    If Request.QueryString("CurPage") = "" then
        CurPage = 1 'We're on the first page
        CurPage = Request.QueryString("CurPage")
    End If
    Dim conn, ConnString
    ConnString = MM_conmelanom_STRING
	Set conn = Server.CreateObject("ADODB.Connection")

	Set rs_cmd = Server.CreateObject ("ADODB.Command")
	rs_cmd.ActiveConnection = MM_conmelanom_STRING

	rs_cmd.CommandText = "SELECT * FROM view_dataedit WHERE patient_id LIKE ? AND (SUBSTRING(cprnr,1,6)+SUBSTRING(cprnr,8,4)) LIKE ? AND initialer LIKE ? AND regime LIKE ? ORDER BY sortid DESC" 
	rs_cmd.Prepared = true
	rs_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 20, "%" & Recordset1__MMColParam & "%") ' adVarChar

Open in new window

Hi all,

I have a new server with windows 2016, and I need to copy across an small number of ASP websites.

So, starting with a single website, I installed all the necessary files and ran the site. When loading a page that connects to an SQL server database, an error occurs and I get a link to a website assuming that ASP is not activated.

To verify that it is, I have loaded a test .asp page and it does load correctly.

I think the issue is related to MDAC, I have tried to install version 2.8 but I can't tell if it actually did install or not. I can't confirm this is the issue but do believe it is database related.

Has anyone else encountered a similar issue, and resolved it?

Any help is appreciated.

We just upgraded to Exchange 2016 from Exchange 2010 and all of our CDO mail-enabled Classic ASP sites are no longer sending mail properly.  As far as I can tell the emails just end up in the BadMail folder on the webserver.  Any direction is most appreciated!  This is a time sensitive issue for us.


    Set iMsg = CreateObject("CDO.Message") 'calls CDO message COM object
    Set iConf = CreateObject("CDO.Configuration") 'calls CDO configuration COM object
    Set Flds = iConf.Fields
    Flds( "http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 'tells cdo we're using the local smtp service
    Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "e:\inetpub\mailroot\pickup" 'verify that this path is correct
    Flds.Update 'updates CDO's configuration database
    Set iMsg.Configuration = iConf 'sets the configuration for the message
    iMsg.To = "yyyyy@thecenter.org"
    iMsg.CC = "zzzzz@thecenter.org"

    sEmailBody = "Please find the attached file for checks dated " & sCheckDate & vbcrlf & vbcrlf & sContent
    iMsg.AddAttachment "e:\Inetpub\wwwroot\CBCHECK\data\ARS311584621i.txt"
    iMsg.From = "webmaster@thecenter.org" 'must be "someone@domain.com"
    iMsg.Subject = "FE - CBCHECK - " & sCheckDate 
    iMsg.HTMLBody = sEmailBody

    iMsg.Send 'commands CDO to send the message

Open in new window

Is there a way to execute a classic asp form submission on a schedule with a timer (ie: submit the form every 30 seconds)?  I have a vb6 application that puts race results online every 30 seconds and I want to send individual results emails automatically from the web site without having to click the submit button.

Is there a way to take a page with a jquery data table and have it scroll through the page (top to bottom) continuously?  I have race results pages that I would like to display on race day so that folks can view their results by watching the results scroll by.  Here is a current results page with a jquery table that does NOT scroll:


I would "clean the page up" for the scrolling page so that it is just the table.

If there is not a data table solution to this, is there another approach I can use to have this happen?

Thank you in advance!
I have a Classic ASP web page, containing a simple data entry form, plus another ASP script to process the form's input, and insert that input to a database table. Everything is working just fine.

Now, I would like to have two combo boxes so that users can select items from another table, as input, instead of everything being free-form. I can show a dropdown list with hard-coded items, but I can't figure out how to show items from a table instead (or how to process the selected items).

It should really be a fairly simple task, but I can't seem to find anything on the web that matches my simple question - they are all complex scenarios.

Perhaps if I list the code, someone can show me the extra code required for the combo/dropdown list?

My request comments are on lines 12 and 17.

The main ASP page :

<form action="updateconcern.asp" method="post">
  <legend>Pastoral Concern Record</legend>
   <input type="hidden" name="SchoolID" value="<%=intID%>" />
      <td><textarea name="Concern" rows="10" cols="60" wrap="soft"> </textarea></td>

   <tr>  <!---***This is where I want the dropdown containing values 1,2,3,4,5, just the numbers, not pulled from a table***--->
     <td><input name="Severity" size="12" type="text" /></td>

   <tr>  <!---***This

Open in new window

I am on a project which requires me to make modes to apps
which have asp directive:

 <!--#include virtual="/global/inc/footer.aspx"-->

on multiple pages.

We can only use IIS express in development therefore I get error:

Parser Error
  Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

 Parser Error Message: Could not find a part of the path 'C:\Fraud-Tip-Form\Fraud-Tip-Form\global\inc\footer.aspx'.

Source Error:

Line 332:                    <tr>
Line 333:                        <td>
Line 334:                            <!--#include virtual="/global/inc/footer.aspx"-->
Line 335:                        </td>
Line 336:                    </tr>

 Source File:  /index.aspx    Line:  334
Is there a way around using IIS Express.  We are prohibited from using IIS for testing.
Currently, I am just deleting the include directive for testing.
I used do a lot of Classic ASP!

Now on a Wordpress site, I want to have a QUIZ, with some questions and dropdowns and textboxes, with Submit buttons.
I need to collect the answers in a database table, grab username, store in session variable (as need several pages).

Can someone point me in the right direction please?

I have a lot of experience programming in MS Access VBA and some experience with classic ASP.

I created a website using classic ASP many years ago which uses MS SQL Server as the backend database engine.

Website visitors can enter a part number in a search box I generated and view a list of parts that are returned as search results.

I would like to add a shopping cart and payment gateway to my existing website but do not know where to start.
My existing code determines the item, quantity, and part number that the buyer wants to purchase.

It seems that I should be able to obtain a collection of pages that I can add to my site that will create the shopping cart and provide a payment gateway.
I should have no trouble integrating this "shopping cart code" with my existing code if it allows me to GET or POST to pass data.

Can anyone suggest a product I can use or someone I can hire to complete the project?

Hi!  I inherited a classic ASP site in 2012r2 running IIS 6.2.  I turned on "Detailed Errors" but all i get is:

An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.

The "here" is just a link to MS KB Page "Classic ASP Not Installed by Default on IIS 7.0 and above" which seems inapplicable to IIS 6.2 and most of the ASP runs fine so all the correct features are installed.  The last time I worked with classic ASP (LOOOooong ago) I configured IIS to serve detailed errors and I got a stack dump and what line of what ASP page the error was on.  I think this page error page was created by my predecessor, but I don't know how to get rid of it and get the detailed errors back.

I need the detailed errors to debug some issues on this unfamiliar site.

Is someone expert enough at old stuff to have a clue how I might turn the full error detail display back on?
I'm using json2.asp from:  https://github.com/nagaozen/asp-xtreme-evolution.

Here is a sample string:
{"Product Line":"B5","Model":"B521432CSSK","length":"14","Column1":"14'x5" Channel Buggy Hauler","Dealer Cost":"$2,685.00"},
{"Product Line":"B5","Model":"B521632CSSK","length":"16","Column1":"16'x5" Channel Buggy Hauler","Dealer Cost":"$2,684.00"},
{"Product Line":"B5","Model":"B521832CSSK","length":"18","Column1":"18'x5" Channel Buggy Hauler","Dealer Cost":"$2,719.00"}

When I run the following:
dim info : set info = JSON.parse(join(array(ProductFeed)))
for each key in info.keys()
Response.write key
set info = nothing

I get numbers. If I remove the brackets at the beginning/end of the string, I get "Product Line", "Model", etc. - but I only get the first row of the string.

I need to loop through the whole JSON string, get the name and value pair, process, go to the next row....

Any help would be appreciated.
Dear Experts
i have an asp web application form , and i have a combo that contains all cultures that exist ex:ar, en, fr
i need when i change the culture from the combo to translate all labels inside
what is the best way to do that ?
thank you
Hi all, I have changed from Access to MSSQL for my database, however some of my Classic ASP code is having issues. little help? I cant find anything through searching

Set Currencies=oConn.Execute("SELECT ticket_curr FROM tickets WHERE ticket_from>getdate() AND ticket_live=TRUE AND ticket_soldout=FALSE GROUP BY ticket_curr ORDER BY ticket_curr")

Open in new window

Using ASP Classic. How do I redirect if a session variable does NOT exist?

<% If session("userid")= "" Then %>  ?

If it does NOT exist, then redirect to :  loggedout.asp

Help is appreciated.
Hi, Experts, how to achieve this result from the loop of record set, arDataArray = Array("100 Banana", "200 Apple", "300 Orange") . After looping I want the result to be like this, Array("100 Banana", "200 Apple", "300 Orange") 100, 200 and 300 are my Procode, Banana, Apple, and Orange are my Proname

   Set rs = cn.Execute("Select Procode, Proname from ActualCount")
      with rs
         If rs.BOF = True Then 'No record
            'Do nothing
            do until rs.EOF
         end if
      end with

Open in new window

I have an ASP page where I am using vbscript to add records to an access database and that is working well, however I only want to add the records if there has been no entry for that day. The access table has a field called EntryDate and its default value if the short date so I was wanting to use this field to determine if anything had been written to the database on the current day based on this. Below is the code that adds the record.

		sql = "Select * FROM tblData;"
        'set OpARS = server.createobject("adodb.recordset")
		OpARS.open sql,dbAConn,adopenkeyset,adlockoptimistic

'Server Side form validation to keep our database clean
dim Site, Availability, Reliability, Efficiency, NminusXST, ProdctLoss, MoneyLoss, Comments

User = vFullName

'If we pass through validation then store the information in the db

OpARs("User") = User
OpARs("Site") = Site
OpARs("Availability") = Availability
OpARs("Reliability") = Reliability
OpARs("Efficiency") = EffSite
OpARs("NminusXST") = NminusXST
OpARs("ProductLoss") = ProductLoss
OpARs("MoneyLoss") = MoneyLoss

RecID = OpARs("ID")


Open in new window

was thinking if using something like IF NOT EXISTS(Select * FROM tblData WHERE EntryDate < Date();)
Hi Experts,
I am submitting Username and Password to a database table with Classic ASP. This is my form:
<form name="form" method="post" action="Passwords_send.asp">
Username: <input name="Username" type="text" id="Username" /><br />
Password: <input name="Password" type="text" id="Username" /><br />
<input type="submit" name="Submit" value="Submit" />

Open in new window

Below is the code that sends the Username and Password to the database:
<!-- #include virtual="/Connections/SQLConn.asp" -->
strUsername = request.Form("Username")
strPassword = request.Form("Password")

'create connection object
Set MesIns=CreateObject("ADODB.Command")
MesIns.commandtext = "insert into Login (Username, Password) VALUES (?,?)"
MesIns.Parameters.Append MesIns.CreateParameter("@Username", 200, 1, 999, strUsername)
MesIns.Parameters.Append MesIns.CreateParameter("@Password", 200, 1, 255, strPassword)


Response.Redirect "Passwords.asp"

Set conn = Nothing

Open in new window

I would like the Username and Password be encrypted. How can I achieve this?
Thank you for your help.
I have a classic ASP page that grabs data from 4 different excel sheets and displays them in a table. what I want to do is since I am pulling pieces of data from 4 different sources I would like to then take the consolidated pieces of data and as it is loaded to this ASP page, also add it to a Access table so i then will have a single source for this particular data. the make up of the ASP page is as follows:
Each row of data in this ASP is placed into a <form name="Form1"> </form><form name="Form2"></form> and so on all the way to form11. so what I have tried to do is at the beginning of the page before the <html> tag i have all my connection strings to each of the excel sheets and this one for the access database:
vMdbFile = Server.MapPath("/virtual/data/BusinessDash.accdb")
	vConnStr = "Provider=Microsoft.Ace.OLEDB.12.0;Persist Security info=False;Data Source=" & vMdbFile	

		'Open Database Connection
		Set dbAConn = Server.CreateObject("ADODB.Connection")
		dbAConn.Open vConnStr
		set OpARS = server.createobject("adodb.recordset")

Open in new window

then down in each of the <form> tags just before the </form> tag so it is after all the other data is pulled from the excels I have:
		sql = "Select * FROM tblData;"
        'set OpARS = server.createobject("adodb.recordset")
		OpARS.open sql,dbAConn,adopenkeyset,adlockoptimistic

dim Site, Availability, Reliability, Efficiency, NminusXST, ProdctLoss, MoneyLoss, Comments

User = vFullName
Site = 

Open in new window

Hi all, I was curious to see if there was a simpler way to change a date format...

I recently have moved my website to a US server and now the date is backwards (MM-DD-YY)

What I code I was using was (DD-MM-YY):
"&Date(*some date*)&"

Open in new window

Is there an easy way to change it back to this format?

Or do I need to do:
"&Day(*some date*)&"/"&"&Month(*some date*)&"/"&Year(*some date*)&"

Open in new window

Any help would be great
I want to show a modal popup button when regular asp button clicked.   using vb.net .....Help!!

Sample below:
asp button
 <asp:Button ID="extButton" runat="server" Enabled="False" Visible="false" Text="Click to Invite External" /></button>

Open in new window

-- popover button hidden until this button active and clicked

<div style="text-align:center; margin-top:10%">

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#demoModal" id="">Click to enter Extended Client Name</button></button>


Open in new window

- This button will appear ready to show modal content

Modal Function
<script type="text/javascript">

        $(function () {

            $("#btnShow").click(function () {





Open in new window

I am having a hard time creating a site map with https://www.gopherstateevents.com/  Could it be because I have several pages (including the home page) that were made with Mobirise and the rest are classic asp pages?  I've tried several online xml site map creators and none seem to be working for me.
I am in the process of migrating some classic ASP applications from Windows Server 2003 to Windows server 2012.

I have managed to get a basic ASP page to run - however when I try and run a page that access's an SQL database I get this error:

error '80004005'
/apps/Retail_Helpdesk/frames/frameoverall.asp, line 17

Line 17 refers to the database connection in my code:

Classic ASP Error
I have setup the ODBC connection to the database and have tested it - it works ok.

I am hoping that someone will know a way of fixing this one.


I have a select that concatenates 3 fields and adds a space between the first name, middle name and last name.

The problem is if there is no middle name then 'fullname' ends up with two spaces between the first and last name. How can I avoid this?

This is my select statement:

CONCAT(ISNULL (a.FirstNm, ''), ' ', ISNULL (a.MiddleNm, ''), ' ', ISNULL (a.LastNm, ''))  AS fullname,  

Open in new window

The space should only be removed if there is no middle name, otherwise there should be space between first, middle and middle last.
Experts - My client has 2 websites (intranet). 1 is written in classic asp and the other in .Net.

.Net web application is 2 factor authentication enabled. The same has been set in web.config under App settings.

Now, the client wants to enable 2 factor authentication in Classic asp web application too. I understand its Old tech and should advise the client to go to .Net. However its a no go from client.

Can someone help get this done please?
1. How do i enable classic asp web application to be 2 factor authentication? (First at https://login.microsoftonline.com/ and then "PingID" as second Auth)
2. Currently it is connected to SQL server and "Connection.asp" has all the connection strings in it.

Please help.






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.