Solved

semicolon separated parameter url

Posted on 2003-10-23
7
589 Views
Last Modified: 2012-05-04
how can asp file identify a semicolon separated parameter in url. AS perl thier iis setting  for this. ASP understand only & separated parameter in url.


any body face this problem. plesae advise me what to do for this .
either any setting in iis or any where in asp progarm.

thanks in advance
-Mahendra Singh
0
Comment
Question by:mca_ms
7 Comments
 
LVL 4

Expert Comment

by:astankovic
ID: 9608024
Are you talking about QueryString parameters? As far as I know it’s in HTTP protocol that & is used to separate QueryString parameters. So there is no IIS setting to change that, and there isn’t anything in ASP page that you can set.

Alex
0
 
LVL 4

Expert Comment

by:1mak
ID: 9608126
you could split the querystring?

e.g.

dim sParms()

sParms = Split(Request.Querystring, ";")

sParms(0) = first parm
sParms(1) = second parm

UBound(sParms) returns the last element number;

dim sParms()
dim sParm()
dim nLoop

' get parms
sParms = Split(Request.Querystring, ";")

' iterate thru each parm displaying name and value
for nLoop = 0 to UBound(sParms)
    sParm = Split(sParms(nLoop), "=")
    Response.Write "Parm: " & sParm(0) & " equals " & sParm(1)
next
0
 

Author Comment

by:mca_ms
ID: 9609374
This is style of url

oldstyl_url standard
newstyle_url Sttandard

Some program return this style like semicolon. In there is in perl or PHP we have setting for both semicoln as well ampersand.

So I am searching abt this... without any parse can we do or not???

Thanks

-Mahendra Singh
0
 
LVL 77

Accepted Solution

by:
arnold earned 500 total points
ID: 9620079
Mahendra,

Do you know which program/s is/are returning the semi-colon separated values?

Can you adjust the separators within those programs?

Technically, Request.Form("parametername") is a builtin parser and the results are hashed.  Ie.  parse on &.  the resulting items are parsed on equal and added to a hash with the parameter as the key and the value from the url as the value of the key.  
I Do not know whether it could take an argument as to the type of separator. i.e. Request.Form("parametername","&;")

1mak has the right approach if one can rely that only semi-colons will be used as separators. Which by the added info provided by Mahendra, the assumption  can not be made.

using 1mak's approach, one would need to first parse on the ampersand (&).
Then find within the separated items, those that contain two equal signs and a semi-colon and parse on a semi-colon.  repeat for each ampersand separated item, until all you have is parameter=value items.

Most likely 1mak's approach modified as above is used in the perl/php code (posibly using modules?).

Arnold
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question