[thelist] asp file referring to itself

aardvark roselli at earthlink.net
Thu Jun 1 17:16:25 2000


pseudo-page:

<% IF Request("foo") = "bar" THEN
		THANKS
	ELSE
		FORM
	END IF %>

<% SUB THANKS %>
Thanks, corporate lackey !
<% END SUB %>

<% SUB FORM %>
<form action="thisscript.asp">
<input type="hidden" name="foo" value="bar">
</form>
<% END SUB %>

> From: "Andrew Martin" <comitque@hotmail.com>
>
> What's the slickest way to post a form to the same asp file that the
> form is on?  
> 
> For example, I want one asp file, main.asp.  When you go to main.asp,
> enter the info in the input boxes, and hit submit, the page checks to
> see if a variable has been set and then displays the proper html for
> the results. 
> 
> If the variable hasn't been set, it goes to the form entry part of the
> file.  If the variable has been set then it goes to the results page.