[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

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.

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

Sign up to Post

I have been adding an attribute (linkToItem="TRUE") specific list item columns for some of my list views (using SPD on their ASPX files).  It works great, however if I subsequently return to the view to say add or remove a filter, the attribute gets removed (I expect that SP is regenerating the view).

Any suggestions on this would be appreciated.

Also, in the same vein,  how can I remove the hyperlink from a view column:
0
Microsoft Azure 2017
LVL 12
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Hello All;

I have a table where the column is a varchar.
(If it needs to change to an INT or Date, please let me know and I will do so.
It is not too late to make that change.)
In the column named = Years
It has the following example.

1978
1965
1985
2017
1962
1998
2012
2002
1958
1978

OK, What I need to do is the following.
For the years in the table, they need to output as

1950
1960
1970
1980
1990
2000
2010
etc...

Thanks.
Wayne
0
I have a long text that has this string$

.... value="variablechars" .....

or
.... value='varchars'....

I need to implement a regular expression in asp to extract these strings and create a list (each record with 2 items)

Once extracted I have no problem in creating the list in my database

the list

name1, value="str1"
name2, value="str2"
name3,value="str3"

name4,value='str4'
name5,value='str5'
name6,value='str5'

I extract email with this code (asp)

Set RegularExpressionObject = Server.CreateObject("VBScript.RegExp")
With RegularExpressionObject
 .Pattern = "[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+"
 .IgnoreCase = True
 .Global = True
 End With

 StringToSearch = blocks(x)
 set objMatches = RegularExpressionObject.Execute(StringToSearch)
 for each objMatch in objMatches
 email=objMatch.value
 next

Also extract  strings as

&nbsp;Actividad <br/>

I guess I am missing the Pattern

Example

<img src="image.png" />&nbsp;Actividad <br/><input type="text" readonly class="textboxif" style="width: 410px;" value="Name of activity" name="sector" id="sector"/></td><td>

Here the items would be

Actividad,Name of activity

I have many atrings that I have to extract the data from

Any ideas?
0
Hello, All;

For SQL Server 2016.
I used to have this code lying around somewhere, but I am unable to find it.
OK.

table (SomeNames)
Johnny
Carr
Wayne
Ronda
Valerie
Tanya
Joey
Vin
Ron
Tony

OK, in the above, I would like to have a list of the Alphabets
Since there is NOT the whole list of letters to comprise the entire Alphabet, it would only show the letters for the names that are available.
For the example above, would be.


C
J
R
T
V
W

Once there are more names added which contain the other letters in the alphabet, then it will then display them letters.
And what I am going to do, is have each letter as a hyperlink on the page, to display all the names for that letter.

Hope this is clear.
I wish I knew where the code was at that I once have.
It is probably buried in a project script, of which I do not remember the name I gave it.
As it was about 5+ years ago, that I remember using it last, as it was at my old home.

Thanks all;
Wayne
0
Hi Experts,
On my classic ASP page I'm displaying a record like this:
<%=rs("UserID")%>

UserID always has to be 6 characters, e.g. 123456
When it's less than 6 characters I would like to display zeroes in front of it, e.g. when UserID is 23456 I would like to display it as 023456
Thank you for your help
0
Can someone help me identify what is wrong with my JQuery/Bootstrap?  On my main page (https://www.gopherstateevents.com/) the top dropdown works well...designed to work on mouse over.  This is a page created in Mobirise.  I tried to re-create the rest of my pages (using classic ASP) but the nav bar has to be clicked to function.  Here is an example:  https://www.gopherstateevents.com/results/cc_rslts/cc_rslts.asp?sport=cc

Obviously something is either mis-placed or missing altogether.  Any help would be much appreciated!
0
I need to be able to separate child nodes and apply logic

my XML Source: https://vpic.nhtsa.dot.gov/api/vehicles/decodevin/ZPBUA1ZLXKLA00941?format=xml

For some reason the text values are concatenating but I want them to be broken out by the Node name and value.  I put notes in the code.  The Code DOES work just not how I need it.

  
<%

url = "https://vpic.nhtsa.dot.gov/api/vehicles/decodevin/ZPBUA1ZLXKLA00941?format=xml"
     
     ' add a BASE HREF tag
     Dim xmldoc
     dim xmlhttp 
      
     Response.write "<BASE HREF='" & url & "'><P>" & url  & "<P>"
    
     
     set xmlhttp = CreateObject("Microsoft.XMLHTTP")
     Set xmlDoc = CreateObject("Microsoft.XMLDOM") 
     xmlhttp.open "GET", url, false 
     xmlhttp.send ""
          'response.write xmlhttp.responsetext
          
          xmlDoc.async = False
          bresult=xmlDoc.loadxml(xmlhttp.responsetext)
       
       State = ""
        ' WORKS ...Set NodeList = xmlDoc.getElementsByTagName("*")
        'Set NodeList = xmlDoc.documentElement.selectNodes("/Response/*")
        'Set NodeList = xmlDoc.documentElement.selectNodes("/Response/Results/*")
   Set NodeList = xmlDoc.documentElement.selectNodes("/Response/Results/DecodedVariable")
        'Set NodeList = xmlDoc.documentElement.selectNodes("/Response/Results/DecodedVariable/*")






        For Each Node in NodeList




         'I NEED SOME SORT OF LOGIC HERE
	           If Node.tagName = "VariableId" Then		        
		        ' 

Open in new window

0
I'm using VB.NET in ASP Web Forms.

I have a button click like this:

    Protected Sub Button1_Click(sender As Object, e As EventArgs)

        Dim DateTimeVar1 As DateTime
        DateTimeVar1 = "10/31/2018 01:05:00 PM"

        'Set Label With Variable Value
        Label1.Text = DateTimeVar1

    End Sub

How do I convert the DateTime variable DateTimeVar1 to a Date variable called DateTimeVar2 ?

So then the value stored in DateTimeVar2 should be: 10/31/2018
0
Hello, all.
(ASP Classic)

Splitting strings, in my case, I have multiple values coming from the database.

a = 94/95
b = value1/value2

Open in new window


Now, on the page, it will be.

<a href="?Type=Label&LabelID=<%=x%>" title="<%=y%>"><%=y%></a>

Open in new window


I can use a split, to get the values broken up.
However, since we are dealing with 2 different values coming in, I cannot use the split and it duplicates everything.

<%
a = split(LabelID,"/")
b = split(LName,"/")
for each x in a
for each y in b
'response.Write (x & "<br />")
%>
<a href="?Type=Label&LabelID=<%=x%>" title="<%=y%>"><%=y%></a>
<%
next
next
%>

Open in new window


So, my question is this.
How can I split it properly, to where it is only a single code that split both values?

Wayne
0
Dear all,

Could I get the absolute url from a relative url placed into an input form?

Example:

Input text = "www.elmundo.es"
absolute url = https://www.elmundo.es

Input text = "w3guy.com/relative-absolute-url-guide/"
absolute url = https://w3guy.com/relative-absolute-url-guide/

Input text = "www.filosofia.org/rev/bas/"
absolute url = http://www.filosofia.org/rev/bas/

There are dozens of solutions to get absolute url from a relative url on address bar (the url of the open page), but not from an input form.

I just make a question ultimately!

Could someone help me to find a solution for this case

Thanks
1
C++ 11 Fundamentals
LVL 12
C++ 11 Fundamentals

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

PROBLEM RESOLVED -- Pretty strange anomaly. The array names are being passed with a left paren, i.e. FieldName is FieldName(  . Pretty bizarre, but I figured it out.

I have a form that will have an unknown number of rows in it. The user is to select the rows that they want and then click the submit button. I store the values for each of the rows (they are filenames) in an array. The values are passed via POST. I can't figure out how to retrieve the array values in the receiving page. This is being written in Classic ASP.

I can do a :
For Each Item In Request.Form
    fieldName = Item
    fieldValue = Request.Form(Item)
    Response.Write fieldName & " " & fieldvalue & "<br />"
Next

and all the values are there. How do I get the passed array values assigned to elements in a receiving array so I can work with the data?
0
Hi Experts,

I'm trying to connect to a Access DB in order to sanitize some data using PHP. I Have already enabled by PHP PDO ODBC driver  (uncomment the extension=php_pdo_odbc.dll line in php.ini) and restarted my IIS.

I get the following code...
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] SQLDriverConnect: 63 [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x14b8 Thread 0x11e4 DBC 0x22f8444 Jet'.' in C:\inetpub\wwwroot\DICE-AccessNOC\includes\access_db.php:18 Stack trace: #0 C:\inetpub\wwwroot\DICE-AccessNOC\includes\access_db.php(18): PDO->__construct('odbc:Driver={Mi...') #1 C:\inetpub\wwwroot\DICE-AccessNOC\find-distinct.php(6): Access_DB::getDB() #2 {main} thrown in C:\inetpub\wwwroot\DICE-AccessNOC\includes\access_db.php on line 18

Open in new window


My includes/access_db.php is
<?php

$TBL = "TBL_DICE_Factorial_Analysis";

class Access_DB{
 
    private static $db;
    
    private function __construct() { } //no new objects can be created
    
    public static function getDB() {    
    
        $access_path = "Z:\\Business\\CLIENTS\\DICE Assessment\\Received Files\\NOC_Database_Backup_2_PHPCopy.accdb";
         
        //One connection per browser session
        if (!isset($db)) {
            $dsn = "odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)}; Dbq=$access_path;";
            self::$db = new PDO($dsn);
        }
        return self::$db;
    }
    
    public function __destruct() {

        self::$db->close();
        
    }
}

function print_variable($var, $label = '', $raw = true){

    echo '<br>=========START=========<br>';
    echo '<b>' . $label . '</b>';

    if ($raw == true) echo '<pre>';

    print_r($var);

    if ($raw == true) echo '</pre>';
    echo '<br>=========END=========<br>';
}
?>

Open in new window


The caller is
<?php
    require_once 'includes/access_db.php';
    
    $query = "SELECT * FROM $TBL ORDER  BY NOC_Code, NOC_Occupation; ";

    $db = Access_DB::getDB();

    $statement = $db->prepare($query);
    $statement->execute();
    $rows = $statement->fetchAll(PDO::FETCH_ASSOC);
    $statement->closeCursor();

    print_variable($rows, 'Fact Analysis');
?>

Open in new window


I have also given full permissions to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC and its children to IIS_IUSRS, but the issue persists.

I'm also posting this under ASP, as I see on Google, this also occurs under ASP.

Any help will be greatly appreciated.
0
How do I extract parent values and all child values from deserialized JSON, one record per child value, to a List<T>?

Sample JSON:  json_sample.txt

So from the attached sample JSON we wish to add the following records to the  list:
Record 1:  aen: Y456789, studentID: 1016, need: MMM, rank: 1
Record 2:  aen: Y456789, studentID: 1016, need: PPP, rank: 2

All records with "needs : null" to be ignored and all "need": "Not Specified" to be ignored. Sample code below:



      CTFNeedDataBatch =
                           (from people in myJSON.content
                            select new NeedCTF
                            {
                                studID = people.StudentBasic.studentId.ToString(),
                                AEN= people.StudentBasic.aen.ToString(),
                                Code = (people.StudentSensitive.needs == null ? people.StudentSensitive.needs[0].need.ToString() : ""),
                                Priority = (people.StudentSensitive.needs == null ? people.StudentSensitive.needs[0].rank.ToString() : ""),
                            }).Where(w => w.Code != "").ToList();


The problem with this code is we are not getting any values from the "needs" element and even if we were, I doubt we would be getting more than one record from an element that has more than one need.
0
Hi, Experts, I wish to include AM/PM on the date base on the solution below. Thanks!

<%
d = CDate(Now)
dim dd, mm, yyyy

dim darr
darr = split(FormatDateTime(d,0),"/")

dd = darr(0)
mm = darr(1)
yyyy = darr(2)

d = mm & "/" & dd & "/" & yyyy 

response.write(d)
response.end()

%>

Open in new window

0
Hi, Experts, I've got problem Inserting data on sqlserver 2008 using ASP or vbscript language. My problem here is when the amountA is has a comma then it would not save the Data. A message says; "There are fewer columns in the insert..." This maybe because of the comma in the amountA. What is the solution to handle the comma within the amountA? Any help please!

   ename = "John"
   amountA = "10,000.00"
   
   con.execute("Insert into zPhone(eName,AmountA) values('" & ename & "'," & amountA & ")")
0
We have an old database with around 400 stored procedures.
The stored procedures are called from an ASP Classic application.

Is there a way to know reliably which of the stored procedures are not being used by the application?
Or do we need to search for the stored procedure name on all the ASP pages in the application in order to find those that don't have any match?
0
Hi all, I am trying to get an autosum working adapting this code:
https://jsfiddle.net/SG7gu/289/

mycode:
I have not changed the javascipt (put in <script language=javascript>) nor the css (put in <style>) and closed off
			Set PackageItemHero=oConn.Execute("SELECT * FROM prod_items,items WHERE prod_items.item_ID=items.item_ID AND pitem_live=TRUE AND dep_ID="&Request.QueryString("d")&" AND pitem_ID=pitem_alt")
			Do Until PackageItemHero.EOF
			MainArea=MainArea&"<tr>"
			MainArea=MainArea&"<td height=50 align=center><img src="&BrandDir&"/c-"&PackageItemHero("item_type")&".png width=40 height=40></td>"
			MainArea=MainArea&"<td height=50 colspan=2><font size=5>"&PackageItemHero("item_name")&"</font></td>"

			MainArea=MainArea&"<td height=50 align=center><label><input type=radio name="&PackageItemHero("pitem_ID")&" value="&PackageItemHero("pitem_gross")&" checked></label></td>"

			MainArea=MainArea&"<td height=50>&nbsp;Included&nbsp;</td>"
			MainArea=MainArea&"</tr>"
			Set PackageItemHeroType=oConn.Execute("SELECT * FROM items,item_type WHERE item_type=itype_ID")
			Set PackageItemOption=oConn.Execute("SELECT * FROM prod_items,items WHERE prod_items.item_ID=items.item_ID AND pitem_live=TRUE AND dep_ID="&Request.QueryString("d")&" AND NOT pitem_ID=pitem_alt AND pitem_alt="&PackageItemHero("pitem_ID"))
			If NOT PackageItemOption.EOF Then			
			MainArea=MainArea&"<tr>"
			MainArea=MainArea&"<td height=15></td>"
			

Open in new window

0
Hi there, I have been looking around but unable to find specifically what I want...

I have an ASP Classic website (tables, rows, columns, not div) and I want to add expand and collapse fields

found plenty for div, but not much (that make any sense) for tables, any help on this would be great
0
I am pulling my hair out on parsing a JSON API response (from ShipStation) due to the arrays within the response object.  I have always used a JSON parser (from demon.tw) which works perfectly for accessing the various items in a JSON object, however it does NOT work with arrays because of the fact that it is using JScript one cannot loop with a variable index.

I have tried a few other JSON classes but still had no success in being able to easily loop through each order and pull the relevant order information for each.

Below is a sample of the JSON response from the API. Can someone please help me loop through the orders (only 2 orders in the array in the sample below), and populate all the necessary order variables on each loop, such as OrderID, Customer info, billing/shipping addresses, line items ordered, priciing etc.


Open in new window

0
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Looking for a sql server/classic asp expert to look at my results code on the link below to suggest changes for efficient querying.  We have a very big day coming up soon with one event of over 6000 participants and I want to know if my code is optimized to avoid logjams.  This is something that I would be willing to entertain bids on.

https://www.gopherstateevents.com/results/cc_rslts/cc_rslts.asp?sport=Cross-Country&meet_id=505&rslts_page=overall_rslts.asp&show_indiv=n

Thank you!.
0
I have a job that I would like to get bids on...if that still happens on this site.  Here is what I need:

I need this page (https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=825&race_id=1427) to "scroll" vertically in marquee fashion for large screen display at races.  All I really need is the data table...or the data in the data table...to be visible.  Please let me know if you would be able to help me and what it would cost me.  I have tried to get this going in the "normal" process of doing it myself with EE help but, due to my weakness in JQuery, I just haven't gotten there.

Let me know if you have questions or if you can help me.
0
Hello, All;

Error
Active Server Pages error 'ASP 0126'
Include file not found
/cs/Header.asp, line 3
The include file '../Imported_Data/ACN.asp' was not found.

Code Line
<!--#include virtual="../Imported_Data/ACN.asp"-->

Open in new window


OK. I have been using this for years, and it still works on my Win2016 Server.
However, running it on my development system, of which is a Win10 Pro.
No longer works.
Enable Parent Paths
Is Enabled in IIS, for the Default Web Site, and all sub sites.

WHAT in the heck did Microsoft do, in the last update to break this?

The actual path of the files is stores in
wwwroot/Imported_Data/

I reference this location with all my sites.
And have NEVER had an issue, until the most recent Windows 10 update, and now it is broken.
At least on my Win10 system.
As stated, it all still works under my Win2016 servers.

Any idea on what can be done in order to get this back working again?
I would really hate to re-code all sites, just because of this one stupid issue.

Carrzkiss
0
I have an asp page which has several fields and I got stuck at drop down button which has to populate data from a query.
But whenever I wrote some code taken from different examples from online I will get http404 error.

How to overcome it.
 my sql query is select cur_date_str,cur_effective_date from tblmovedate; where I need drop down to be filled with cur_effective_date data.

Please help me
0
Dear,
Any help to this problem?
31h.png
0
Experts -

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

Ex:
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.
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.