Today I will mainly introduce the following knowledge points:
How HTML forms are submitted
HTM control
Get HTML form Content
Garbled problem
SQL injection
Server-Side Forms
HTML server Control
How HTML forms are submitted
For an ordinary HTML form, it has two important properties: action and method.
The action attribute indicates which program is to be processed by the current form submission, which can be any dynamic Web page or servlet or CGI (Common Gateway Interface), which is usually handled by the ASPX page in asp.net.
The method property indicates how the form forms are submitted. It has two possible values get and post.
Let's use an example to illustrate the difference between get and post. Create two ASPX pages with Dreamweaver8, register.aspx and getuserinfo.aspx respectively. For the moment we don't need to write any code on the getuserinfo.aspx page, the code for the Register.aspx page is as follows:
<%@ Page language= "C #" contenttype= "text/html" responseencoding= "gb2312"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<meta http-equiv= "Content-type" Content= "text/html; charset=gb2312 "/>
<title> User registration </title>
<body>
<form action=" Getuserinfo.aspx "method=" "
<table border=" 1 "width=" 400px "
<tr><td colspan=" 2 "> User Registration </td></tr>
<tr><td> username </td><td><input type= "text" name= "username"/ ></td></tr>
<tr><td> password </td><td><input type= "password" name= "pwd"/ ></td></tr>
<tr><td><input type= "Submit" value= "submitted"/></td><td> <input type= "reset" value= "reset"/></TD></TR>
</table>
</form>
</body>