Check if unassigned variable exists in Request.QueryString

后端 未结 5 633
伪装坚强ぢ
伪装坚强ぢ 2021-02-07 05:59

Within the context of an ASP.NET page, I can use Request.QueryString to get a collection of the key/value pairs in the query string portion of the URI.

For example, if I

5条回答
  •  执念已碎
    2021-02-07 06:14

    Request.QueryString.GetValues(null) will get a list of keys with no values

    Request.QueryString.GetValues(null).Contains("test") will return true

提交回复
热议问题