how does Request.QueryString work?

后端 未结 5 2094
暗喜
暗喜 2020-12-09 17:03

I have a code example like this :

 location.href = location.href + \"/Edit?pID=\" + hTable.getObj().ID; ; //aspx    
 parID = Request.QueryString[\"pID\"];          


        
5条回答
  •  不知归路
    2020-12-09 17:20

    A query string is an array of parameters sent to a web page.

    This url: http://page.asp?x=1&y=hello
    
    Request.QueryString[0] is the same as 
    Request.QueryString["x"] and holds a string value "1"
    
    Request.QueryString[1] is the same as 
    Request.QueryString["y"] and holds a string value "hello"
    

提交回复
热议问题