Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending form from the only one asp page

Status
Not open for further replies.

Coding

Programmer
Aug 13, 2000
25
0
0
CA
Does anyone know how to write the ASP code inside the asp page that contains all form elements in order to send the form content.
Actually, I made it in two asp pages by action="desiredform.asp" and submit button. But I want to do the same writing code in just one asp page. On button click to submit the form elements and process their content on the server. Is it possible to do this all in one asp page?
 
here is an example

Code:
<%@language=VBscript%>
<%
if Request.Form(&quot;Submiting&quot;) = &quot;&quot; or IsEmpty(Request.Form(&quot;Submiting&quot;)) then

<--- Pute whatever here if this is a first load -->

else

<--- put whatever here that would be for processing the submited detail --->

end if
%>

you generally use your same page as the action, and use a
<input type=&quot;hidden&quot; name=&quot;Submiting&quot; value=&quot;yes&quot;>
somewhere in your form, so that when the page reloads, and see's that there is something existing for Request.Form(&quot;Submiting&quot;) it will process the rest of the form values.

otherwise it shows you the form itself. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
You can also pass a hidden variable along from the first form (default) using the above method I write multiple pages all the time using only one asp. I also multi language asp's in the same way.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top