<% '******************************************************* '* ASP 101 Sample Code - http://www.asp101.com/ * '* * '* This code is made available as a service to our * '* visitors and is provided strictly for the * '* purpose of illustration. * '* * '* http://www.asp101.com/samples/license.asp * '* * '* Please direct all inquiries to webmaster@asp101.com * '******************************************************* %> <% Dim bAutoNavigate ' Our flag which indicates autonavigation status ' Set our flag to False unless it's passed on the querystring as True bAutoNavigate = CBool(Request.QueryString("auto")) If bAutoNavigate <> True Then bAutoNavigate = False ' If needed include the client side script for the autonavigation If bAutoNavigate = True Then %> <% End If ' Show our form ' Pretty plain, but you could pull the links from a DB to make things ' more interesting. See our db_pulldown sample if you're interested. ' The only thing to notice is that I remove the event handler if we're ' not autonavigating. %>
<% ' If we're autonavigating then I hide the submit button ' since it's not needed. That is assuming the script works! ;) If Not bAutoNavigate Then %> <% End If %>
<%' Our little on / off switch. It passes the opposite of the current setting! %> Toggle Auto Navigation