Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

semicolon separated parameter url

Posted on 2003-10-23
7
Medium Priority
?
666 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
4 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 80

Accepted Solution

by:
arnold earned 2000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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…
Screencast - Getting to Know the Pipeline

773 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