Handling arrays in request.querystring (c#)

  • Thread starter Thread starter Matthew Thompson
  • Start date Start date
M

Matthew Thompson

I am developing an application which allows users to choose multiple
text sections from a list, displayed as a CheckBoxList, for printing.

The sections are being passed to a page using the QueryString and as
such I am getting a URL similar to the following created...

http://localhost/doprint.aspx?pid=1462?pa=ovr&pa=arr&pa=bth&pa=gen

Pid is a unique identifier for the entity which the text sections are
related to and pa is a list of text sections to be printed.

In Classic ASP getting these out in order was fairly simple but there
seems to be a bewildering array of methods to attack the
Request.QueryString object.

Ideally I'd like to end up with a comma seperated list or array of the
values assigned the the "pa" array.

Can anyone offer assistance? I'm writing in C#.

M@t :o)
 
Request.QueryString.GetValues("pa") will return array of string

HTH

Thanks - this worked great - shame you can't just foreach through
Request.QueryString.GetValues("pa")! Are you listening Microsoft :o)

M@t :o)
 
Hi Matthew,

Thank you for posting to the MSDN newsgroups.

I have forwarded your request to the product team. In addition, you can
also send the feedback/feature request of our products to Microsoft
directly.

http://register.microsoft.com/mswish/suggestion.asp

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top