Access Query string parameters with no values in ASP.NET

后端 未结 4 588
天涯浪人
天涯浪人 2020-12-01 12:03

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

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 12:48

    ASP.NET does not support determining the presence of query string parameters without values since Request.QueryString["customize"] and Request.QueryString["foo"] are both null. You'll either have to parse it yourself or specify a value e.g. ?customize=1

提交回复
热议问题