Home | Advertising Info162 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Tuesday, December 12, 2017  


Using Forms to send information between ASP Pages




Many beginner ASP programmers have a hard time with this concept. Here is an example if you want to use forms to transfer information between ASP pages. It is actually very simple and is used quite often when building ASP applications.

Using a Form With Post

<form action="somepage.asp" method=POST>
   <input type ="text"
value ="somevalue" name ="somevariable">
   <input type=submit>
</form>


Supports more characters than GET or PUT
The page the form is submitted to will not show the parameters in the address window

The ASP page the form is submitted to uses the following code to retrieve the variable

<% somevariable = Request.Form("somevariable") %>


Using a Form with GET or PUT


<form action="somepage.asp" method=GET>
   <input type ="text" value ="somevalue" name ="somevariable">
   <input type=submit><input type=reset>
</form>


The number of characters is limited
The page the form is submitted to will show the parameters in the address window
The ASP page the form is submitted to uses the following code to retrieve the variable

<% somevariable = Request.Querystring("somevariable") %>


Something To Think About
You can simply use
Request("somevariable")
and it will retrieve it from the header no matter which of the 3 methods you used. This is probably a little slower but it makes for easier coding if you are not worried about milliseconds of time savings.

Also some versions of IE on the MAC do not work with "PUT" and will give you a 404 error, so it is probably best just to use "GET" though it is definitely a bug that they never seem to fix.

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2017 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com