Solved

semicolon separated parameter url

Posted on 2003-10-23
7
564 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 76

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
maxMirror challenge 10 89
scores100 challenge 3 84
object oriented javascript web form 8 74
base64 decode encode 12 98
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.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now