0

I can't understand what some of my code is doing exactly. Here's what I have:

model.People = _PersonProvider.GetListByIds(_HttpContext.QueryString()["people"])

I know that the model.People = (_HttpContext.QueryString()["people"] is supposed to return a list of id's but I'm having trouble knowing how it's doing that. Is this doing some kind of webservice call maybe? Something to do with the URL? I'm new to asp.net.

DannyD
  • 2,732
  • 16
  • 51
  • 73

1 Answers1

1

I am bit confused with the syntex you are using. As far as I know querystring variables are fetched as

HttpContext.Current.Request.QueryString["XYZ"]

This returns the value of variable from the querystring of current page. Say the URL you used to access a page is:

http://myURL.com?XYZ=Value1&ABC=Value2

then

HttpContext.Current.Request.QueryString["XYZ"] will return Value1 and 
HttpContext.Current.Request.QueryString["ABC"] will return Value2
Guanxi
  • 3,103
  • 21
  • 38