How to check that Request.QueryString has a specific value or not in ASP.NET?

前端 未结 8 1278
孤街浪徒
孤街浪徒 2020-12-08 06:12

I have an error.aspx page. If a user comes to that page then it will fetch the error path in page_load() method URL using Request.QueryStrin

8条回答
  •  既然无缘
    2020-12-08 06:27

    think the check you're looking for is this:

    if(Request.QueryString["query"] != null) 
    

    It returns null because in that query string it has no value for that key.

提交回复
热议问题