1. Form submission:
Copy codeThe Code is as follows:
<Formaction = "target. aspx" method = "post" name = "form1">
<Input name = "param1" value = "1"/>
<Input name = "param2" value = "2"/>
</Form>
....
Form1.submit ();
....
This method is generally used in html pages and not in asp.net, because asp.net forms are always submitted to their own pages.
Ii. Link Method of tag
Copy codeThe Code is as follows:
<Ahref = "target. aspx? Param1 = 1 & param2 = 2 "> link transfer </A>
Receiving page: string str = Request ["param1"]
Iii. Session sharing
Copy codeThe Code is as follows:
Sending page: Session ("param1") = "1 ";
String str = Session ("param1"). ToString ();
4. Application Sharing
Copy codeThe Code is as follows:
Sending page: Application ("param1") = "1 ";
By page: string str = Application ("param1"). ToString ();
This method is not often used. Because the Application is shared within an Application domain, all users can change and set its value. Therefore, only the counters and other places that require global variables are used.
5. Cookie
6. Response. Redirect () method
Copy codeThe Code is as follows:
Response. Redirect ("target. aspx? Param1 = 1 & param2 = 2 ")
Receiving page: stringstr = Request ["param1"]
VII. Server. Transfer () Mode
Copy codeThe Code is as follows:
Server. Transfer ("target. aspx? Param1 = 1 & param2 = 2 ")
Receiving page: stringstr = Request ["param1"]