On Thu, 19 Aug 2004 22:34:02 -0700, "Matt" <ma*******@hotmail.com>
wrote:
When people say submit the form data, does it mean the form data are
submitted to web browser using either HTTP GET or POST method, and then it
will redirect to another page.
For example, this is page1.aspx
<form action="page2.aspx" method="post">
means it will submit the page1.aspx form data to the web server, and then
redirect from page1.aspxto page2.aspx?
POST or GET will always have a page that the request is directed to,
but it doesn't need to be a different page than the original. It can
recursively submit to itself with no problem, you just have to have
all the code in the single page to both create the form and handle the
results.
Simple example, save as "test.asp":
<html>
<head>
<title>Test Page</title>
</head>
<body>
<p>Please Enter Your Name:</p>
<form action='test.asp'>
<input type='text' name='name' id='name' size='30'>
<input type='submit' name='submit' value='Submit'>
</form>
<hr>
<%
Response.Write "Your Name Is: " & Request.Querystring("Name")
%>
</body>
</html>
Enjoy!
Jeff