Experience, if there is a mistake, please correct the Xlongjiu @ hotmail.com
Webform
l Take the Redirect method of httpresponse class in System.Web Namespace, the httprequest class QueryString method receives
Communicate in a method in WebForm1 in source
Response.Redirect ("WebForm2.aspx? S = 1 & ss = 11");
The method and attribute of the // HTTPRESPONSE class is disclosed by the internal response object of ASP.NET.
// So Response can use the former method
Pass the target class WebForm2
Private Void Page_Load (Object Sender, System.EventArgs E)
{
/ / Place the user code here to initialize the page
Int loop1;
NameValueCollection COLL;
// load form variables INTO NameValueCollection variable.
COLL = Request.queryString;
The method and attribute of the // httpRequest class is disclosed by the internal Request object of ASP.NET.
// Get Names of All Forms Into a string array.
String [] arr1 = coll.allkeys;
For (Loop1 = 0; loop1 { Response.write (Arr1 [loop1] "=" Coll.getVALUES (Arr1 [loop1]). GetValue (0) " } } // This lists the value of S & SS passed from WebForm1 l Here to explain the server-side control
");
MS-help: //ms.vscc/ms.msdnvs.2052/cpgenref/html/cpConHtmlFormControl.htm
Note that the Action property is always set to the URL of the page itself. Unable to change the action attribute; therefore, only the page itself can be returned.
Of course, the FORM that is often used in the ASP can still submit data to the ASPX page, such as the following example:
//form.htm file