PDA

Click to See Complete Forum and Search --> : ASP Help


ghoff12
Jul 9th, 2001, 09:47 AM
I have a page called main.asp

Its just a form where i want the user to enter in some information, and than click the submit button. When they click the submit button, i want the asp code on main.asp to be executed. My problem is this:

When i load up main.asp .. the asp code gets executed automatically. What do i need to do in order to just have the asp code to be executed only when the submit button is clicked.

Thanks in advance

sebs
Jul 9th, 2001, 10:30 AM
just do,

let say you have a hidden text box called isSubmit

<input type="hidden" name="isSubmit" value="yes">

do


if request("isSubmit") = "" then
firstTime
else
the form has been submitted
end if