Difference between Request.Form and Request.QueryString?

前端 未结 6 485
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 17:02

Can some tell me the exact difference between Request.Form and Request.QueryString?

I know one difference, like

If th

6条回答
  •  离开以前
    2021-02-02 17:09

    I found some other difference

    Request("id") 
    

    will first try to locate

    Request.Form("id") 
    

    then

    Request.Querystring("id") 
    

    then

    Request.Cookies("id") 
    

    and finally

    Request.ServerVariables("id") 
    

    it is reccommended to use the explicit naming convention if possible because it is more efficient and more readable.it also enables you to be sure where your information is coming from since the system will stop after the first hit is made.... It is also faster for the system if you specify the location of the information.

    and we can refer this link for more some details :

    http://www.hanselman.com/blog/ASPNETParamsCollectionVsQueryStringFormsVsRequestindexAndDoubleDecoding.aspx

    But any one know any other difference, I really appreciate that .

提交回复
热议问题