The submission of the form and manner GET POST What is the difference between

Related Tags:

  The submission of the form and manner POST GET What is the difference? 

  Solutions: 

  The difference between the form needed to see before, mainly in the form of data sent and received on the way. 

  Concrete steps: 

  Post and Get all of the optional form of Method attributes, the default values for Method Get, the main difference between the two: 

  1. Client, Get in the way through the url submission of data submitted after the address in the address bar as shown in Figure 1.4.3. 

  Figure 1.4.3 Get submission form after the address bar 

  The Post submitted to the same column, as shown in Figure 1.4.4. 

  Figure 1.4.4 Post submission of the form after the address bar unchanged 

  2. Server can only use Request.QueryString Get access to the data submitted by the Post submission of data to be used Request.Form access: 

  <% @ Language = "VBScript" Codepage = "936"%> 
<html>
<head>
  <title> Form to the testing </ title> 
  <meta Http-equiv="Content-Type" content="text/html; charset=gb2312"> 
  </ Head> 
<body>
  <Form method = "post" action ="<%= Request.ServerVariables ( "Script_Name ")%>"> 
  Submit data: 
  <input Name="oStr" type="text"> 
<br>
  Submitted by: 
  <select Name="select" onchange="this.form.method=this.value"> 
  <option Value="Post" selected> Post </ option> 
  <option Value="Get"> Get </ option> 
  </ Select> 
<br>
  <input Type="submit" name="Submit" value="Submit"> 
  </ Form> 
<%
  If Request ( "Submit ")<>"" then 
  Response.Write "through" & Request.ServerVariables ( "Request_Method") & "submission of the data:" 
  If Request.ServerVariables ( "Request_Method") = "GET" then 
  Response.Write Request.QueryString ( "oStr") 
  Else 
  Response.Write Request.Form ( "oStr") 
  End if 
  End if 
%>
  </ Body> 
  </ Html> 

  Note: Although the two methods can be integrated with the Request ( "oStr") to obtain the data, but it affected the efficiency of the process, not recommended. 

  Special Note 

  IIS running through the case of the code (using http://localhost/method.asp this way here, the installation and configuration of IIS, please refer to Part IV), the importation of the data submitted, select Post submission will be read to the effect shown in Figure 1.4.4.    Get submission choice, the effect will be as shown in Figure 1.4.3. 

  Special Note 

  In general, try to avoid using Get submission form, as this may lead to safety problems.    For instance, on the landing Get used forms, user input is the user name and password in the address bar will be completely exposed.    But in the paging process, the methods used to Get Post than good.    In the case of the form used to explain the properties of ASP (Please refer to Part IV): 

  Get the action attribute parameters added to the designated address, and open the way to anchor. 

  Post sent through HTTP post processing of data. 

Related articles:

Flash MV random background production
  Flash MV in the production, the production of background animation is a very important part, it was also called Vision background.    Making a lot of friends in the background, like hand-drawn, of course, this is an effective method.    But in this case, we will use a larg...
Ajax abroad article reprint
  Below are several excellent articles on asp.net ajax:    1, Extending the ImageMap HTML Control with AJAX 1.0 Extensions (when the mouse remain in the picture, especially on the map, a pop-up on the local detail)    Expansion: Gridview can control, such as, when an entr...
Break Dreamweaver 8: To understand CSS Cascading Style Sheets
  Understanding of Cascading Style Sheets    Cascading Style Sheets (CSS) is a series of formatting rules, which control the appearance of Web page content.    Use CSS settings page format, content and form of expression should be separate.    Page content (ie HT...
FW MX 2004 Guide (9): Image Transform
  Image Transform technology in the website frequently used, that is, when the mouse to move to a certain image or button, it will trigger another graphic display.    In Fireworks, Image Transform principle is to enable the production of "frame" in the frame of a panel of gr...
Web2.0 features List
  Tangos had also wanted to learn from, as the title of a sensational to attract attention, but this area but lack the ability, not only to use this point to stimulate the title, really meaningless.    Wrote this is because today Checklist see this Web 2.0, a full list inside 20 au...