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

前端 未结 8 1274
孤街浪徒
孤街浪徒 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:49

    You can also try:

    if (!Request.QueryString.AllKeys.Contains("aspxerrorpath"))
       return;
    
    0 讨论(0)
  • 2020-12-08 06:51

    What about a more direct approach?

    if (Request.QueryString.AllKeys.Contains("mykey")
    
    0 讨论(0)
提交回复
热议问题