Request() vs Request.QueryString()

前端 未结 1 832
花落未央
花落未央 2021-01-04 22:48

I have recently started using Request(\"key\") instead of Request.QueryString(\"key\") to access my querystring values. However I have read that:

相关标签:
1条回答
  • 2021-01-04 23:34

    They're checked in the following order:

    1. QueryString
    2. Form
    3. Cookies
    4. ServerVariables

    The search is short-circuited, so as soon as a matching key is found the value is returned.

    So, to answer your question, a matching QueryString item takes precedence over Cookies.

    0 讨论(0)
提交回复
热议问题