logo
Tags down

shadow

How do I traverse a collection in classic ASP?


By : jbulow
Date : July 28 2020, 11:00 PM
I wish this helpful for you Whatever your [things] are need to be written outside of VBScript.
In VB6, you can write a Custom Collection class, then you'll need to compile to an ActiveX DLL and register it on your webserver to access it.
code :


Share : facebook icon twitter icon

Sorting a collection in classic ASP


By : James B.
Date : March 29 2020, 07:55 AM
this one helps. In this case I would get help from big brother .net. It's possible to use System.Collections.Sortedlist within your ASP app and get your key value pairs sorted.
code :
set list = server.createObject("System.Collections.Sortedlist")
with list
  .add "something", "YY"
  .add "something else", "XX"
end with

for i = 0 to list.count - 1
    response.write(list.getKey(i) & " = " & list.getByIndex(i))
next

C# collection to Classic ASP


By : Chinmay Sahoo
Date : March 29 2020, 07:55 AM
wish helps you I think you found the answer; Classic ASP with VB does not have generics built into it. So, you try to pass an IEnumerable to ASP and it comes out as a nightmarish mashup name which classic ASP has no clue how to work with.
The solution is to pass a non-generic IEnumerable. The problem then is that the sequence is treated as containing basic Object instances. You must revert to the pre-2.0 methods of casting objects you get out of a list. In VB this isn't difficult; just explicitly specify the element type and VB will implicitly cast for you while iterating through the For Each:
code :
Dim obj, x 
Set obj = Server.CreateObject("Namespace.class")

For Each x As MyObj in obj.GetMyObj //casts each element in turn
   ...

Collection of objects in classic ASP using VBScript?


By : stnvaldez1
Date : March 29 2020, 07:55 AM
this will help I have a class called 'Company' that has properties like 'CompanyName', 'CompanyCode' and 'IsActive'. This class is in VBScript. I want to store a collection of Company objects using VBScript in classic ASP. Is this possible, and if yes, then how would I do it? , You can use an array or a dictionary object:
Array
code :
' create an array with a fixed size
dim companies(2) 

' fill the array with the companies
set companies(0) = Company1 
set companies(1) = Company2
set companies(2) = Company3

' iteration example 1
dim company
for each company in companies
    response.write company.CompanyName
next

' iteration example 2
dim i
for i = 0 to ubound(companies)
    response.write companies(i).CompanyName
next
' create a dictionary object
dim companies
set companies = server.createObject("Scripting.Dictionary")

' add the companies
companies.add "Key1", Company1
companies.add "Key2", Company2
companies.add "Key3", Company3

' iteration example
dim key
for each key in companies.keys
    response.write key & " = " & companies.item(key).CompanyName
next

Classic ASP JSON sub collection


By : iidaatcnt
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I am using the Classic ASP JSON class from http://www.aspjson.com/ to convert a JSON feed from an external source for use within my site. , I was not using the 'data' item enough.
This code:
code :
If Not IsEmpty(this.item("attachments")) Then
 for each i in this.item("attachments").item("data").item(0).item("subattachments").item("data")
  set this2 = this.item("attachments").item("data").item(0).item("subattachments").item("data").item(i)
  response.write "here"
 next
end if

How to setup ASP Classic and ASP.NET WebForm in the same visual studio solution - for rewriting ASP Classic pages in ASP


By : Edgar Bravo
Date : March 29 2020, 07:55 AM
With these it helps The simple answer to your question is that in Solution Explorer you right click on the project root, select Add -> Existing Item, and then add your .asp files to the project. You may already have some files which have nothing to do with .net in your project, such as stylesheets and image files, treat .asp files in the same way. Beyond that there's no additional setup required
Classic ASP code isn't compiled, it's intepreted at runtime, so you won't be able to debug them the way you would with C#/VB.net files within VS, the standard way to debug Classic ASP is via error messages when you try run the page. When you have a mixture of Classic and .net I find it helps to see them as two separate websites which live in the same root folder.
Related Posts Related Posts :
  • Cutting a string at first space
  • strong consistency for reads on aerospike - why do they need regime numbers?
  • Enumerating sequences in sorted PySpark Dataframe
  • Acumatica behind reverse proxy causes issues with GetFile.ashx
  • Update column in KDB table based on condition of multiple columns in table
  • How can I execute step-by-step debugging in Common Lisp ECL?
  • A dynamic message orchestration flow engine for Kafka
  • How do you read/query the response body in API V2 of dialogflow-fulfillment?
  • what does "virtual" mean when applied to a SystemVerilog interface?
  • Add URL to the button in sap ui5
  • How to get an AWS KMS Key Arn and pass it in IAM role inline policy by CloudFormation?
  • async operations using Combine and SwiftUI
  • For loop data sanity check fails in Ride
  • MarkLogic OPTIC Query not returning results when Protected Paths are configured
  • in z/OS Assembler, can I read a JCL input stream twice?
  • Firestore rules 'allow create' create document with different ID if already exists
  • Can I customize the inbuilt browse button in Install4j?
  • Why does vkAcquireNextImageKHR() never block my thread?
  • Converting Columns into Rows in Pentaho
  • SAML private and public key sharing
  • how visualize multi channel of feature from PyTorch?
  • Free Pascal - Create an array of previously declared elements/objects
  • Raku: what is the syntax for shell calls with spaces?
  • Difference between Account-level and User-Level Network Policies
  • Polymer/Lit-element, child component doesn't re-render when the property is modified by the parent
  • how to convert HAC flexible query to DAO query
  • Cannot refresh UI if update in ItemView
  • Microsoft Bot Framework: Smilies in MS Teams
  • How to overwrite the theme in shopify
  • How to find distinct records in vespa.ai?
  • How to do pagination using groupby in vespa.ai?
  • Ada - gnatdoc issue with processing subunits
  • Struggling to collect and return DBMS_SQL.COLUMN_VALUE using User Defined Type
  • Google Actions Simulator MalformedResponse Media response is not supported on this device
  • Sphinx: Use a different directive for a different output format
  • How to use condition with lists in Terraform 11
  • Kafka Consumer Continuously sending TCP packets to Kafka Server
  • What is wrong with the syntax in this assign statement I use?
  • FIX 4.4 Tag specified out of required order
  • JHipster: How to display customized error messages to users
  • Counting the number of facts in a cell in MDX
  • What should I do to solve the GNAT GPS "library not found" problem and build my first "Hello World"
  • How to validate a negative value being passed in as a alphanumeric literal?
  • Can I use n2 or n2d machine types with Cloud Dataproc?
  • Subtracting 1 day from date variable causing errors
  • Segment and offset uses
  • What's the best online payment processing solution?
  • Best self-balancing BST for quick insertion of a large number of nodes
  • How can I tell if a web client is blocking advertisements?
  • Monitor a specific RSS
  • How far can LISP macros go?
  • How do I calculate these statistics?
  • Learning to write a compiler
  • How to make subdomain user accounts in a webapp
  • How to get the Country according to a certain IP?
  • ASP, need to use SFTP
  • Unload a COM control when working in VB6 IDE
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org