4 ways to get the parameters
<HTMLxmlns= "http://www.w3.org/1999/xhtml"> <Head> <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"/> <title></title> <Scripttype= "Text/javascript"> functionGo () {window.location.href="localhost:21811/handler1.ashx?id=1&name= ' abc '" } </Script> </Head> <Body> <!--//Several forms of parameter transfer - <!--the first: Add parameters directly after the URL: -localhost:21811/handler1.ashx?id=1&name= "ABC"<!--The second type: Using hyperlinks to pass parameters: When you click on the hyperlink, the first jumps to the Localhost:21811/handler1.ashx page, and then passes the ID and name two parameters past - <ahref= "localhost:21811/handler1.ashx?id=1&name= ' abc '">Hyperlink pass-through parameters</a></Body> <!--The Third kind: Through the JS method pass: The user clicks this button, triggers the onclick event, executes the Go () method, jumps to the Localhost:21811/handler1.ashx page, simultaneously passes the ID, and the name two parameters past - <inputtype= "button"onclick= "Go ()"value= "Pass parameters by JS method" /> <!--Fourth: Passing through form form forms - <formAction= "Handler1.ashx"Method= "Get"><!--Note that the connection within the action cannot have parameters -><inputtype= "text"name= "id"value= "3" /> <inputtype= "text"name= "Name"value= "ABC" /> <inputtype= "Submit"value= "By passing parameters" /> </form> </Body> </HTML>
Four forms of parameter passing-----URL, hyperlink, Js,form form