How do you test your Request.QueryString[] variables?

前端 未结 11 2175
梦如初夏
梦如初夏 2020-11-29 16:05

I frequently make use of Request.QueryString[] variables.

In my Page_load I often do things like:

       int id = -1;

             


        
11条回答
  •  误落风尘
    2020-11-29 16:32

    Try this dude...

    List keys = new List(Request.QueryString.AllKeys);
    

    Then you will be able to search the guy for a string real easy via...

    keys.Contains("someKey")
    

提交回复
热议问题