To Examples
Person1 Example, source code file person-info1.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- Traditional HTML form to be submitted to server using method="get". The verify.aspx file verifies that the data is received. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>PersonInfo1 Example</title> <link rel="stylesheet" type="text/css" href="../examples.css" /> </head> <body> <h2>PersonInfo1 Example -- Form Page</h2> <p>Use method="get" to submit form to server.</p> <form action="verify.aspx" method="get"> <table> <tr> <td>Name</td> <td><input type="text" name="txtName" size="20" class="ctrl" /></td> </tr> <tr> <td>Gender</td> <td><input type="text" name="txtGender" size="20" class="ctrl" /></td> </tr> <tr> <td>Age</td> <td><input type="text" name="txtAge" size="20" class="ctrl" /></td> </tr> <tr> <td></td> <td><input type="submit" value="Submit Person Info" class="ctrl" /> </td></tr> </table> </form> </body> </html>
Person1 Example, source code file verify.aspx
<%@ Page Language="C#" %> <!-- Person1 and Person2 Examples -- Verify Page Receive form data from person1.htm or person2.htm Verify that information is received on server. --> <script runat="server"> public void Page_Load(object sender, EventArgs e) { litInfo.Text = "Name: " + Request.Params["txtName"] + "<br />" + "Gender: " + Request.Params["txtGender"] + "<br />" + "Age: " + Request.Params["txtAge"]; } </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Person1 and Person2 Examples</title> <link href="../examples.css" rel="stylesheet" type="text/css" /> </head> <body> <h2>Person1 and Person2 Examples -- Verify Page</h2> <form id="form1" runat="server"> <asp:Literal ID="litInfo" runat="server" /> </form> <p><a href="person-info1.htm">Back to Person1 Form Page</a><br /> <p><a href="person-info2.htm">Back to Person2 Form Page</a></p> </body> </html>