#!/usr/local/bin/perl asp
<% $Response->Include('header.inc', $Request->Form('color') || 'white',5); %>
 Demonstration of dynamic includes. 
	|  | This first example demonstrates dynamic includes SSI style.
	First try entering a color in the box to be passed as a runtime argument to the
	included header for this file.  Just hit enter after typing in the color. | 
	|  | Now to show you how to access dynamic includes through the API
	extension $Response->Include($filename, @args)... please
	enter a number of columns less than 10 in the text box, and a grid will
	be produce below of that size. | 
	| <%
	my $size = $Request->Form('size');
	if($size > 0 and $size <= 10) {		
	    # Response->Include() and Server->Execute do the same things
	    # but the former is the native solution, and the latter comes
	    # from the recent IIS/ASP 3.0 API extension.  Formally, Execute()
	    # doesn't take arguments, but we allow this functionality.
	    if($size % 2) {
		$Response->Include('table.inc', $size);
	    } else {
	        $Server->Execute('table.inc', $size);
	    }
	} else {
		print "Please enter a valid number from 1 to 10 in the form.\n";
	}    
	%> |