I am trying to set up a page that has two behaviors. I’m separating them by URL: One behavior is accessed via /some-controller/some-action, the other is via /some-controller/some-action?customize.
It doesn’t look like the Request.QueryString object contains anything, though, when I visit the second URL…I mean, the keys collection has one element in it, but it’s null, not 'customize'. Anyone have any ideas about this or how to enable this. I’d like to avoid manually parsing the query string at all costs :).
ASP.NET does not support determining the presence of query string parameters without values since
Request.QueryString["customize"]andRequest.QueryString["foo"]are bothnull. You’ll either have to parse it yourself or specify a value e.g.?customize=1