We help IT Professionals succeed at work.

ASP

81K

Solutions

31K

Contributors

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.

Can someone help me determine why the checkbox on https://www.gtraxc.com/login.asp is disabled?  I can't find the problem.

Thanks!
0
Is there a simple javascript function that will return the exact time of day on the click of a button?  Once I have that value, then I need to send it to a sql server db on my web server.  I want to get the time on the client side (rather than using the classic asp Now() function, which doesn't get the time until it reaches the server) so I know there is no lag if the internet is slow.  So here is what I need:
1) User clicks a button on their smart phone.
2) Javascript assigns system time to a variable.
3) Variable is passed to classic asp.

I can take it from there...
0
Hi,

I need to convert this html file attached to classic asp. Please advise how I go about doing so. Thankyou.
sample.txt
0
I have a web site where the labels on each of the data entry fields on the data entry screens have an HTML link to a help pop-up with information about that particular data entry field. The pop-ups need to be non-modal and the pop-up mechanism needs to allow multiple pop-ups to be open at the same time and not necessarily within the parent viewport. The site is a Classic ASP application which runs under Windows on as variety of web browsers.

The site works fine with IE and Firefox. However, with Microsoft Edge, the pop-up window is about 400 pixels wide (instead of the specified 240 px) and cannot be made smaller by grabbing the right edge of the window and trying to resize it. With Google Chrome, the pop-up window is about the right size, but has scroll bars.

Yeah, I know that each browser's rendering engine is different, but why are the pop-ups for Edge and Chrome not behaving per the HTML spec, which says the minimum window with allowable is 100 px and a window calling parameter string specifying 'no scrollbars'.

What am I missing here? Do I need to build my pop-ups using jQuery UI?

Here is a VB Script code snippet for the typical situation:

<td height="17" valign="middle" class="formlabel">
      <a href="javascript:;" onClick="openBrWindow('../../popups/results_pop/summaryselect_co.htm' ,'', 'top=100,left=550,width=240,height=300,scrollbars=no)">
      Number of Selected Companies</a>:&nbsp;</td>

and here is the JavaScript code to open the window:

      function …
0
I'm trying to call a MySQL stored procedure from an ASP classic script. The stored procedure simply returns an integer value 99 and outputs the result. Unfortunately the result returned toggles between 0 and 67 every time you refresh the page and it should simply show 99.

The stored procedure is defined here:

DELIMITER //
CREATE PROCEDURE Proc_Test (IN  Lang_param  VARCHAR(10),
                            OUT ID_param    int)
BEGIN
   SET ID_param = 99;
END //
DELIMITER ;

Open in new window


The database is MariaDB, v10.3.17.

Here is the ASP classic script calling the stored procedure. As value is passed in which does not get read but more importantly the return value is read and displayed.

<%@ Language=VBScript %>
<%
    Option Explicit
    Response.Buffer = True
    Dim Hostname, Username, Password, Database
    Hostname = "localhost"
    Username = "XXXXXXX"
    Password = "YYYYYYY"
    Database = "baseline"
    
%>
<html>

<head>
<title>Baseline Connection</title>
<style type="text/css">body {font: normal 11px Arial}</style>
</head>

<body>

<%
   Const adCmdStoredProc = 4
   Const adParamInput = 1
   Const adParamOutput = 2
   Const adInteger = 3
   Const adVarChar = 200

   Dim Command
   Dim Connection
   Dim ConnectionString

   Dim myLang
   Dim myID

   Set Connection = Server.CreateObject("ADODB.Connection")
   ConnectionString = _
     "DRIVER={MySQL ODBC 8.0 ANSI Driver};" & _
     "SERVER=" & Hostname & ";" & _
     "Database=" & Database & ";" & _

Open in new window

0
I have a website that uses classical ASP. I am using localhost, and originally the pages were developed using MS Visual InterDev - ASP 3.0
I wanted to look at some of the coding in a page and the original coding is gone and in it's place is all these vti_ statements..
Can someone tell me what has happened and how to fix it ??
Here's an example below:

vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|16 Dec 2003 14:39:42 -0000

Open in new window

1
Hello All:

I have a classic web forms asp (vb) web application that I am working with.  I have one page that I would like to embed a value from my web.config's app.settings.  this page references an external js file.  What I am ultimately trying to do is pass the value from app.settings to the js file on an onclick event.  The app.settings key holds the value of the current server, so I have transforms set to update the web.config with the correct server name when the application runs.

So in my app.settings I have:
<add key="CurrentServer" value="ProductionServer"/>

What I was trying to do was something like this:
<input type="hidden" id ="CurrentServer" value="<%$ AppSettings: CurrentServer %>" />

My reasoning behind this approach is then in the external file, I could target this input by doing something like:

let currentServer = document.getElementById('CurrentServer').value

When I run the page, I receive the following error:
Literal expressions like '<%$ AppSettings: CurrentServer %>' are not allowed. Use <asp:Literal runat="server" Text="<%$ AppSettings: CurrentServer%>" /> instead.

Can someone please steer me in the right direction?  Would a server control be more appropriate?  If so, how would I interrogate the rendered control using JavaScript once the onclick even is fired that triggers the javascript code?

Many thanks for any assistance!

Juan
0
I'm trying to call a MySQL stored procedure and read its out parameter using ASP classic. Unfortunately I get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[MySQL][ODBC 3.51 Driver][mysqld-5.5.5-10.3.17-MariaDB]OUT or INOUT argument 2 for routine baseline.Proc_Test is not a variable or NEW pseudo-variable in BEFORE trigger
/functions/command_procedure.asp, line 54


The stored procedure is defined here:

DELIMITER //
CREATE PROCEDURE Proc_Test (IN  Lang_param  VARCHAR(10),
                            OUT ID_param    int)
BEGIN
   SET ID_param = 99;
END //
DELIMITER ;

CALL Proc_Test ('eS', @myID);
SELECT @myID;

Open in new window


Here is the ASP classic script calling the stored procedure:

<%@ Language=VBScript %>
<%
    Option Explicit
    Response.Buffer = True
    Dim Hostname, Username, Password, Database
    Hostname = "localhost"
    Username = "baseline-user"
    Password = "xxxxxx"
    Database = "baseline"
    
%>
<html>

<head>
<title>Baseline Connection</title>
<style type="text/css">body {font: normal 11px Arial}</style>
</head>

<body>

<%
   Const adCmdStoredProc = 4
   Const adParamInput = 1
   Const adParamOutput = 2
   Const adInteger = 3
   Const adVarChar = 200

   Dim Command
   Dim Connection
   Dim ConnectionString

   Dim myLang
   Dim myID

   Set Connection = Server.CreateObject("ADODB.Connection")
   ConnectionString = _
     "DRIVER={MySQL ODBC 3.51 Driver};" & _
     "SERVER=" & Hostname & ";" & _

Open in new window

0
I'm having a problem using OUT parameters in a stored procedure call, IN parameters work just fine but OUT parameters cause a server '500 Internal Server Error message'

My setup is below, any advice appreciated

   Set Conn=Server.CreateObject("ADODB.CONNECTION")
   Set RS = Server.CreateObject("ADODB.RecordSet")
   Conn.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=" & Hostname & "; Database=" & Database & "; UID=" & Username & ";PASSWORD=" & Password & "; OPTION=3;"
   strSQL = "Create_Dummy ('eS', @mySuccess, @myStatusCode, @myID)"
   Set RS = Conn.Execute(strSQL)
   If RS.BOF And RS.EOF Then
      Response.Write "The connection to the Baseline is successful but unfortunately no record found in the database."
   Else
      Response.Write(RS.Fields("Success_param").value)
      Response.Write(RS.Fields("Status_Code_param").value)
      Response.Write(RS.Fields("ID_param").value)
   End If
   
   Response.Write(mySuccess)
   Response.Write(myStatusCode)
   Response.Write(myID)
0
I am using an AjaxControlToolkit ComboBox in a C# web application. My Webform page will not display the contents of the dropdown list added in code behind. This works when I have a master page. However I need to remove the m,aster page from the project and this results is the dropdown list not displaying. Appreciate if someone can explain how I can get the dropdown list working without the master page.

regards
Pat

WebForm.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="TiosClient.WebForm3" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button1" runat="server" Text="Button" />
        </div>
        <asp:Button ID="Button2" runat="server" Text="Button" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        
        <ajaxToolkit:ComboBox ID="ComboBox1" runat="server">
        </ajaxToolkit:ComboBox>

         <div >
           <p><ajaxToolkit:ComboBox ID="ComboBox2" runat="server">
            </ajaxToolkit:ComboBox>
            </p>
    </div>


         <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
    </form>

</body>
</html> 

Open in new window


WebForm3.aspx.cs
using System;
using 

Open in new window

0
Hi there.

I use some javascript to create an email from clicking an icon. The script is like this:

function clickemailuhk() {
	username = "uhk";
	hostname = "xxxxx.dk";
var linktext = username + "@" + hostname ;
    var link = "mailto:" + linktext + "&subject=" + escape("XXXXXX website...");
    window.location.href = link;
}

Open in new window


And it is activated with this:

<img src="images/Mail_icon_mini.png" width="26" height="26" title="Click to send email" onClick="clickemailuhk()">

Open in new window


It used to work fine, but now it creates an email with this in the "To" field:

uhk@xxxxx.dk&subject=AgeCare website...


It used to place the subject in the subject-field in an email.
I use Outlook. What happened lately, and how can I correct it to work as intended?

Best regards

Ulrich
0
Hello, all.

OK, working with SQL Server 2019, and it works wonderfully with accented characters.
Dvořák Hall
It displays to the page just fine.
However, when I try to read from a URL QueryString, it's not working.
I get
Dvo
Instead of the full name.

I have at the top of my main page.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Response.ContentType = "text/html"
Response.CodePage = 65001
Response.CharSet = "UTF-8"
%>
 

Open in new window


But it still will not get the URL: /Page/Dvořák_Hall
And display it correctly to the page, to use against the database query.

Any suggestions?
Wayne
0
how do I load an old asp program to VS and run it with debug?
0
Hello, All.

I am trying my best to NOT have to encode the apostrophe in a URL name to this: Nothin%27_to_Lose.
I have tried to replace the apostrophe with a * or a Period, and when I do a Request.QueryString("Title") on this
Nothin*_to_Lose
It is replaced with
Nothin

What am I missing here?
Does the Request.QueryString() not work with these types of characters?

Wayne
0
Hello,
I have an asp net page with separate VB code behind page.
The aspx page is about 2000 px long. There are is a top, middle, and lower sections.
I need to be able to jump to each section based on various events in my code behind.
I was thinking of putting a heading label for each section.  I would like a command that I could insert as needed in my code behind to jump to specific labels. It will need to work across desktop and mobile platforms.
Thanks,
WillieCg
0
I'm moving an application from a dedicated Windows Server / IIS to Azure with SQL Database and App Service.  The existing application runs on MS Access "server" with Classic ASP pages and it is pretty speedy.

The following query on existing server for example returns all records in about 3 seconds.  There are 36,720 records in the "loads" table.

Now that I've moved the DB to Azure SQL the records are returned in about 35 seconds to the Azure App.  My current Azure config is Serverless Gen5, 2-8 vCores, 6GB-24GB memory.  After increasing the compute power I noticed the results returned faster, so I suspected poor query design.

Question:  Can the following query be optimized further?  I expected much better performance on SQL Server vs. MS Access "Server"

SELECT        dbo.loads.ID, dbo.loads.CustomerID, dbo.loads.CustomerContactID, dbo.loads.RequestDate, dbo.loads.Equipment, dbo.loads.Commodity, dbo.loads.Stops, dbo.loads.Miles, dbo.loads.CommentsPublic, dbo.loads.GrossQuoted,
                         dbo.loads.Weight, dbo.loads.Length, dbo.loads.Width, dbo.loads.Height, dbo.loads.CargoValue, dbo.loads.CommentsPrivate, dbo.loads.UserID, dbo.loads.Created, dbo.loads.forfeitload, dbo.loads.voidload, dbo.loads.shipperid,
                         dbo.loads.shippercontactid, dbo.loads.shippercomments, dbo.loads.consigneeid, dbo.loads.consigneecontactid, dbo.loads.consigneecomments, dbo.loads.usforwarderid, dbo.loads.usforwardercontactid,
                         …
0
Hello All;

In the following statement, I need to know how to place the ? for the parameterized Query.
The part we are looking at is
 (CHARINDEX('/?/', '/' + Tracks.LID) > 0)
When run in SSMS, this is the way it will look
 (CHARINDEX('/1/', '/' + Tracks.LID) > 0)
(Replacing the ? with a number)

sqlctLabel.commandtext="SELECT COUNT(DISTINCT Tracks.AlbumID) AS Albums FROM Tracks INNER JOIN Albums ON Tracks.AlbumID = Albums.AlbumID INNER JOIN Artists ON Albums.ArtistID = Artists.ArtistID WHERE (CHARINDEX('/?/', '/' + Tracks.LID) > 0) GROUP BY Artists.ArtistName, Artists.ArtistID"
sqlctLabel.Parameters.Append sqlctLabel.CreateParameter("@LID", adInteger, adParamInput, , strLabelID)

Open in new window

1
I am new to AWS. I have done a great deal of background reading/research which always helps when you are trying to resolve a problem.
That being said, I have a problem which I do not understand.
We have an ASP legacy system which will remain in ASP indefinitely.
We have stored pdfs with images – S3 in the AWS cloud.
The images and pdfs are “public”.
Part of the URL is dynamically constructed each time based on the “user” that logins (tagged onto the AWS info) We have a newer system – codeigniter/php –  which will display the pdfs and image just fine with the dynamically created URL.
But will not do so in our ASP legacy system.
I understand that by the simple use of a URL, I should be able to access the pdf etc., and particularly since the pdfs and images are “public”.
I develop using localhost, (PHP-Wampserver) but can also develop ASP.
SO my question is two fold.
Do we need to install a something on our ASP server to enable us to view the images as well??  
And what SDK must I install on my localhost (I am thinking the JavaScript and PHP)
I thought maybe it might be a security/permission issue with the ASP server accessing the cloud but that doesn’t make sense because on the ASP side, it will display the pdf but not the image.
This is becoming urgent and any help/advice/pointers would really be appreciated. Thank you.
0
Ok I know this sounds bizarre but I have a web page that I access on my phone.  It has a "submit" button that I need to be very sensitive to the touch, so that the instant I press it, it responds.  Sometimes I have to do it multiple times to get it to submit.  I assume an app would be better but for now my only option is a web page.  Is there any way that I can make this a more "responsive to pressing" submit button than it is now?  It is big enough that it is hard to miss.

Thank you!
0
I am a little inexperienced with console error messages.  How can I resolve "You have 3 errors on your page  uncaught SyntaxError: Unexpected token '<'" on this page: https://www.gopherstateevents.com/results/cc_rslts/relay_rslts.asp?meet_id=637&race_id=3175

Thank you!
1
Our ASP VBscript programs that send out an email (like from a contact form) have worked perfectly for years. Suddenly, the .Send function is generating an error 80040211.

Again, nothing to our knowledge has changed.

Is there a way to see what the specific error may be?
0
Can someone please help me to understand why I am getting this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'Lab@xyz.org'.

/trainingSessions/SQLRuns2.asp, line 58


 strSQL3 = "UPDATE _Employees SET Pager = e.LName + ""Lab@xyz.org"" FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = " & Session("strPIID")                                        
 set rsEMP = oConn.Execute(strSQL3)


This is the result in SQL Server Profiler:

UPDATE _Employees SET Pager = e.LName +  "Lab@xyz.org" FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = 7165
0
I use data tables to display results of races that we time on a classic asp website (https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=883&race_id=1516).  This weekend the results of one of our bigger races showed a Data Table error until I figured out that one person's name was incorrectly entered, with a "/" inserted (ie: Johns/on).  There were no issues in the way the results were calculated and displayed everywhere except in our data tables.

Here is my question:  Are there other characters that will prevent JQuery data tables rendering?  Also, should I build some error trapping in to prevent these characters (ie: Replace(FirstName, "/", "").  Seems like a lot of processing for something that is so unlikely to happen?

Thanks in advance.
0
I am trying to send race results to race finishers in classic asp and my script keeps timing out.  I have my Server.ScriptTimeOut set plenty high.  (note that I just added the xmlhttp.SetTimeOuts)  Not sure if I have the other timeout set correctly.  Can someone look at the following code and let me know what changes might help please?  Thans!

Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServer) = "smtp.mandrillapp.com"
    .Item(cdoSMTPAuthenticate) = 1
    .Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
    .Item(cdoSendUsername) = "username"
    .Item(cdoSendPassword) = "pwd"
    .Update
End With

    bSentBCC = False

	For j = 0 To UBound(SendTo) - 1
		'get email address
		sMyEmail = vbNullString
				
		If DontSend(SendTo(j)) = False Then sMyEmail = SendTo(j)

		If Not sMyEmail = vbNullString Then
			If ValidEmail(sMyEmail) = True Then
                            
                sPageToSend = "http://www.gopherstateevents.com/misc/pix-vids_notif.asp?event_id=" & lEventID 

                Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
	                xmlhttp.open "GET", sPageToSend, false
                    xmlHttp.SetTimeouts 0, 60000, 300000, 300000
	                xmlhttp.send ""
	                EmailContents = xmlhttp.responseText
            

Open in new window

0
Hi there, I was trying to work out the length of a Request.QueryString

I have been looking around, however I can only find this, which doesnt give me the result I like:

Len(CStr(String))

Open in new window

This gives a value of 6 or what ever the length the text is...

What I would like is...

http://domain.com/?i=AUGPA <- the bold part, how can I determine the length of this?
1

ASP

81K

Solutions

31K

Contributors

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.