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.

a href="mailto:DOI.Webmaster@illinois.gov?subject=Request Speaker&body=Please supply the following information - %0A%0AFirst paragraph%0A%0ASecond paragraph%0A%0AThird paragraph"

I'm thinking that it would somehow be put into the "body" otherwise I'm just changing the color of the link.  If possible I would like to tile a background and make the first line in larger and bolder font.  Is this possible?
0
I am using Classic ASP. I created a recordset using DW. But I am getting an error.

-- recordset code --

<!--#Inbox group-->
<%
Dim rs_inboxgroup__MMColParam
rs_inboxgroup__MMColParam = "0"
If (Session("firmid") <> "") Then
  rs_inboxgroup__MMColParam = Session("firmid")
End If
%>
<%
Dim rs_inboxgroup__MMColParam2
rs_inboxgroup__MMColParam2 = "0"
If (rs_qnrgroup("GuestIds") <> "") Then
  rs_inboxgroup__MMColParam2 = rs_qnrgroup("GuestIds")
End If
%>
<%
Dim rs_inboxgroup
Dim rs_inboxgroup_cmd
Dim rs_inboxgroup_numRows

Set rs_inboxgroup_cmd = Server.CreateObject ("ADODB.Command")
rs_inboxgroup_cmd.ActiveConnection = MM_bluedot_STRING
rs_inboxgroup_cmd.CommandText = "SELECT a.Id ,         a.QnreId ,         a.FirmId ,         a.Subj ,         a.BodyText ,         a.SentBy ,         a.SentTo ,         a.SentOn ,         a.QnreData ,         a.IsAccepted ,         a.AcceptedOn ,         a.SenderEmail ,         b.UserId ,         b.LastNm ,         b.FirstNm ,         b.Archivedcont ,         b.ContactStatus FROM QnrsMailed a         INNER JOIN Users AS b ON a.SentBy = b.UserId WHERE a.FirmId = ?         AND a.Originatedby IN (?)         AND a.IsAccepted = 2 ORDER BY a.SentOn DESC;"
rs_inboxgroup_cmd.Prepared = true
rs_inboxgroup_cmd.Parameters.Append rs_inboxgroup_cmd.CreateParameter("param1", 5, 1, -1, rs_inboxgroup__MMColParam) ' adDouble
rs_inboxgroup_cmd.Parameters.Append rs_inboxgroup_cmd.CreateParameter("param2", 5, 1, -1, …
0
I have a Blob in my database which contains an XML string, with names of fields and their values.
Some of those fields match fields in tables in my database. like say 'name' or 'address', etc. and other fields are not matched to my database but info that is relevant for other purposes.

We have a routine to send this XML string to a web service to be processed. BUT we need to do this BEFORE we send the XML to the web service.

We need to update the XML with the information we have in our database, THEN send it to the web service, this update only applies to the fields that match fields in the database, so that the name of the field is the same, then we need to update the value in the XML with the value we have in the database.

This is because often times the information in the database changes, like addresses, phone numbers, etc. And when we saved the Blob (XML) it had old numbers or addresses. This way when we send the XML for processing we are sending it with the NEW information and not the old one.

We just don't know how to create code to update the fields in the XML that match fields in our database.
We have a table (UserMap) which has the list of all the fields we have in the DB.

We are using MS SQL 2008 R2
0
I have a windows 2012 web server. It has two asp classic websites on it that work great.
It has one .net website that has several asp classic web pages on it.
One I go to the asp classic pages on this site, they error. Although I am running asp classic fine on this server for other websites.

I have setup the IIS for ASP the same as far as I can tell.
I get a 500 internal server error. Not a detailed error message.
I know I'm missing something big here. Please give me a hint as I have a headache and can't think. :)

thanks!
0
Hi There,

We have migrated an umbraco website to GoDaddy shared hosting. After migration everything seems to be working as expected apart from the contact form.
When we fill out the contact form and press send, we receive attached .NET error.
We have even changed the STMP relay server on the web.config file to Godaddy's internal SMTP relay server but still the same error.

Please do let us know what we can try next to get this fixed.

Regards,
Robin
Screen-Shot-2015-07-16-at-23.12.53.png
0
We have a web application(hotel management software) which is developed in classic ASP with SQL server 2012 and it evolved over 8 years to its current form which has 825 of pages(including the process pages), huge database and more than 300 active users going through at least 30 pages per day.

We are using  Session ,Cookies ,Query String etc in Application. As this is an existing and working application we do have daily support issue fixes and new enhancement going on in  .asp , but we have to migrate this application  to ASP.NET MVC .What is best approach and design to continue current application while starting migration in parallel.

Can we use same IIS directory for both .asp and ASP.NET MVC application to host new pages ? How to plan and go ahead with this migration.

We thought of identifying the main modules in this application and rewriting them one by one by separating the application into different layers such as database (existing), then business logic and the view. This way newly developed modules will be added to existing system and new pages will replace old pages in that particular module. At the same time we can test the new layers alongside old system and release them once we feel confident.

Advise with any sample implementation document will be of great help and value.

The code we have now is not written function by function and the design, SQL and functionality code are all in the same page.  Help us on the database design also which would …
0
Hello,

I want create role in ASP. I see in a book how to do it but i don't sucess.  To do it the book say me to go Web Site ---> Configuration ASP.NET but i don't find it.
I want access to Administration's tools to add role but i don't find it too.

Thanks to help.
0
Hi experts
i have an old classic ASP application that was working perfectly, lately this application was moved to a new 2014 server and iis 8, the application still working fine but, the application accept dd/mm/yyyy date, but when its added to the database its added as mm/dd/yyyy if the d<10 and dd/mm/yyy  if the d>=10
i checked the location and date format for the server and it was dd/mm/yyyy, and the database didn't changed since the old server.
i searched the net and found the i need to change the iis culture under GLOBALIZATION, but i don't know what to choose even if i chose my country still i am facing the same issue.
any suggestion
0
As I continue to debug my page I get this alert in  the ie console:

HTML1506: Unexpected token.
File: Index.asp, Line: 474, Column: 1

For this code:

<!-- footer -->
<div class="footer">
      <div class="pull-right"><a href="../../TermsofService.asp" target="new">Terms and Conditions</a> | <a href="../../PrivacyPolicy.asp" target="_blank">Privacy Policy</a></div>
 
</div>
0
We routinely have to enter participant data for races and we like to identify if a particular person exists in our system based on first name, last name, city, st, email, gender.  Note that only first name, last name, age or dob, and gender are required fields.  I would like to add a utility that provides a list of "matches" based initially on last name and then possibly filters from there as other data is entered.  At any time, I would like the person entering the data to be able to click on a choice and have all available fields auto-fill.  We use sql server 2012 as our database.

Thank you very much!
0
While debugging my page I found this alert on ie console:

HTML1300: Navigation occurred.
File: Add.asp

What does that mean ?  do I need to correct anything ?
0
I am trying to use a script that concatenates a date field and a time field.

page1: Has the form that posts to page2.

page1 has a start date and start time as well as an end date and end time. It should put date and time together into a hidden field and then post the data.  In this demo I post it to page 2 but it will ultimately be inserted into a database.

Attached is the code for both pages. Any help is appreciated. As of now the values come up blank.
example.txt
0
Is there a way to run a Stored procedure when a button is clicked ?

Using classic ASP/VB script

Here is the code for my button:

<a href="SPDeleteQnr.asp?QnrId=<%=(rs_outboxall.Fields.Item("Id").Value)%>" class="btn btn-white btn-sm" onClick="GP_popupConfirmMsg('Please confirm you wish to delete the Questionnaire.');return document.MM_returnValue"> <i class="fa fa-trash-o"></i> Delete </a>

As you can see right now I have the SP on a separate page. I want to see if I can include it in this page and run it when user clicks on the 'delete' button. On the page it runs on pageload then redirects back to this page.

Here is my SP:

<%

if(Request("QnrId") <> "") then Updatestatus__MMColParam = Request("QnrId")

%>
<%

set Updatestatus = Server.CreateObject("ADODB.Command")
Updatestatus.ActiveConnection = MM_bluedot_STRING
Updatestatus.CommandText = "Delete from Qnrsmailed where id = " + Replace(Updatestatus__MMColParam, "'", "''") + ""
Updatestatus.CommandType = 1
Updatestatus.CommandTimeout = 0
Updatestatus.Prepared = true
Updatestatus.Execute()

%>
0
I am using ASP Classic.

I am currently using the script below on a page that has a stored procedure. It redirects to a specific page.

<script language="javascript">
window.location.href="Index.asp";
</script>

I need to tweak it so that it redirects to the PREVIOUS page.

Right now I have two pages that go to this one and because the redirect is fixed I need to pages to go back to the correct previous page.
Hope that makes sense.
0
We had  exchange server 2003, recently we updated MS office to MS Office 365 which there is no static IP for exchange server anymore.

We have an asp.net website which can send out emails using exchange server, the following is part of web.config file in asp.net application.

Now what should I change to make mail server work again?

<configuration>
      <appSettings>
              <add key="MailServer"  value="192.168.1.7"/>
      </appSettings>
</configuration>
0
I am using DW CC2014 to create a recordset. Yet, I am getting an error. When I run the query in MS SQL Manager it returns the correct values.

-- error displayed --

ADODB.Command error '800a0d5d'

Application uses a value of the wrong type for the current operation.

/bluedot/includes/bdot/recordsets.asp, line 294

-- recordset code --


<%
Dim rs_qnrgroupcount__MMColParam
rs_qnrgroupcount__MMColParam = "0"
If (Session("FirmId")  <> "") Then
  rs_qnrgroupcount__MMColParam = Session("FirmId")
End If
%>
<%
Dim rs_qnrgroupcount__MMColParam2
rs_qnrgroupcount__MMColParam2 = "0"
If (rs_qnrgroup("GuestIds") <> "") Then
  rs_qnrgroupcount__MMColParam2 = rs_qnrgroup("GuestIds")
End If
%>

<%
Dim rs_qnrgroupcount
Dim rs_qnrgroupcount_cmd
Dim rs_qnrgroupcount_numRows

Set rs_qnrgroupcount_cmd = Server.CreateObject ("ADODB.Command")
rs_qnrgroupcount_cmd.ActiveConnection = MM_bluedot_STRING
rs_qnrgroupcount_cmd.CommandText = "SELECT COUNT (a.Id) AS total FROM QnrsMailed a inner join users as b on a.sentby = b.userid WHERE a.Firmid = ? and a.Originatedby IN (?) AND a.IsAccepted = 2"
rs_qnrgroupcount_cmd.Prepared = true
rs_qnrgroupcount_cmd.Parameters.Append rs_qnrgroupcount_cmd.CreateParameter("param1", 5, 1, -1, rs_qnrgroupcount__MMColParam) ' adDouble
rs_qnrgroupcount_cmd.Parameters.Append rs_qnrgroupcount_cmd.CreateParameter("param2", 5, 1, -1, rs_qnrgroupcount__MMColParam2) ' adDouble

Set rs_qnrgroupcount = rs_qnrgroupcount_cmd.Execute
0
I have a script that works in one page but not another. It takes the values of two fields (Date and time) and on click concatenates them into a hidden field before the form is submitted.

Here is my script code:

<!--
 function putDateInHiddenField() {
  var text = document.form1.startdate;
  var hidden = document.form1.startdatecomp;
  var d = document.form1.startime;
  var drop = d.options[d.selectedIndex];
  hidden.value = "";
  hidden.value += text.value + " " + drop.value;
 }
 -->
 </script>
  <script language="javascript" type="text/javascript">
 <!--
 function putDateInHiddenFieldend() {
  var text = document.form1.endate;
  var hidden = document.form1.endatecomp;
  var d = document.form1.endtime;
  var drop = d.options[d.selectedIndex];
  hidden.value = "";
  hidden.value += text.value + " " + drop.value;
 }
 -->
 </script>

This are my hidden fields

<input name="startdatecomp" type="hidden" id="startdatecomp">
              <input name="endatecomp" type="hidden" id="endatecomp">

And this is the button on my form

<button class="btn btn-primary" type="submit" onClick="putDateInHiddenField();putDateInHiddenFieldend();return document.MM_returnValue" >Add</button>

I checked twice and made sure the names of the form and the other fields are correct.  Maybe you can see something I am missing. The scripts work fine on other pages.
0
I am trying to implement the SmartMenu jQuery menus into a very old, antiquated ASP classic website.

First question, will this even work? Because I can't get it to work, but that could be because my paths are messed up or something.
Second question, if it should work, what am I doing wrong?

Here is my page:
http://csd.blam.me/lib/menu/menu.asp
Here is the demo as an html on my test site:
http://csd.blam.me/lib/menu/smartmenus/demo/keyboard-navigation.html
(Zoom the above at 50% to see that everything is falling to the right and off the page)


Here is their demo page on github:
http://vadikom.github.io/smartmenus/src/demo/

You can hit my page and view the source code and see how I am setting it up.
Two problems:
The drop downs are not working in my .asp page.
The content doesn't fall down below the menu, it kind of tries to continue from the right of the menu.

So any ideas how to fix those two issues and if it will even work in asp classic?

thanks!
0
I have a sql statement that I am runing against an Informix table. It is a simple query and my question is this.

If there are value to return, then it returns the count of them. However, if there are no values, then it is blank. Is there a way that the count return a Zero if the result is nothing?

Here is my statement:

SELECT informix.sfu_inventory_rec.brand,   Count(informix.sfu_inventory_rec.invid) As Count_invid
FROM informix.sfu_inventory_rec
WHERE informix.sfu_inventory_rec.brand = 84
Group By   informix.sfu_inventory_rec.brand
0
I thought this had worked but it didn't.

Here is the original post:

This is the script given as response:

UPDATE Users
SET ExpiresOn = CONVERT(VARCHAR(10), ExpiresOn, 103)
WHERE ISDATE(ExpiresOn) = 1

But that converts to this:   Sep  2 201

It loses the year's last number and also should be in this format:   mm/dd/yyyy

Unfortunately I assigned the points to early. So I am reposting.

----  Original post ----

I currently have a field which is 'ExpiresOn' it is a varchar (25)

 Sometimes user will enter a date and sometimes something else like "NA".
 Problem I had is we added date & time in that field so then it displays in the database as "May 11 2011 12:00AM"

 I need a query that will reformat any entry that is a date time with the format above to the following format:  mm/dd/yyyy, using the example above it would be 05/11/2011

 Help is greatly appreciated.  Example of entries in my DB attached.

 Table name is "Users"
 Field name is: "ExpiresOn"
0
I want to display a button if the value of:

(rs_outboxall.Fields.Item("SenderEmail").Value)

is not null. A recordset exists, but I want to display the button ONLY when the value is NOT null

Help appreciated.
0
I have a page in ASP/JavaScript. I am moving it to ASP/VB script. I need a little help with this part of the code:

I need to show a 'region' based on the value of a field in the recordset.  (Using DW) . recordset name is 'rs_qnrsent', the field name is 'isaccepted'

 If  qnrsent.isaccepted = 0
                    Sent
If qnrsent.isaccepted= 3
                    In progress
If qnrsent.isaccepted= 2
                    Awaiting approval
If qnrsent.isaccepted= 1
                    Accepted
0
We moved our intranet site to a new server as the old 2003 server was being decommissioned. Once a few tweaks were done we were able to serve up the pages fine and all was good. However there is a page that will only return a 500 server error.
When viewed on the server the error is given as "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 link simply goes to an IIS site to tell you how to enable classic asp in IIS which has already been done.
The broken page uses: Server.CreateObject("CDBRecordSet.DBRecordSet") and Server.CreateObject("ADODB.RecordSet") and server.CreateObject("Scripting.FileSystemObject")

Could it be one of these calls that is being blocked (or other?).
Ultimately I will rewrite this app to use a more modern approach but in the meantime, how can I get it up and running?
0
Hi All

I'm trying to achieve the following

1. Redirect https://www.mysite.com to https://www.mysite.com/applicationame/Prod/LoginPagege
2. Capture all 404 requests to point to the same login page

Is this possible please? I've tried configuring this in the HTTP Redirect option under Feature View but I'm getting this error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Thanks in Advance.
0
Hello,

I've run up against a problem I can't solve after lengthy research. I have a legacy ASP site (used for filing warranty claims) on a Server 2003 32-bit machine running IIS 6.0 that I'm moving to a Server 2008 32-bit machine running IIS 7.0 due to Server 2003 EOL. Unfortunately I don’t have much programming experience so that doesn’t matters.  The site prompts users for their credentials, authenticates them with AuthentiX authentication software against an MS Access database (connected via ODBC DSN), then upon successful authentication takes said user to the first ASP page. As the site is supposed to work (and does on the old server), the User ID (Dealer Account) is shown on the page, along with two fields for entering an email address and a serial number. When the user clicks "Continue", the page verifies the Dealer ID and serial number against a SQL database on the same server (also connected by a ODBC DSN), and the dealer ID again against our ERP database on a separate SQL server. The site proceeds to the next page for additional info if successfully verified (warnings are shown if either entry is not verified). However, I can't even get that far. When I click "Continue" after entering a valid serial number (and my own email address), I get a warning that a required field isn't filled out correctly, which happens to be the User ID/Dealer Account (see below).

 screenshot of error message popup

Open in new window


 I suspect there's a connection issue with one of the databases, …
0

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.

Top Experts In
ASP
<
Monthly
>