<Keyword><%</Keyword><ASP Text> </ASP Text><Comment>'kate: hl ASP;</Comment><br/>
<Control Structures>if</Control Structures><ASP Text> </ASP Text><Other>(</Other><ASP Text> </ASP Text><Function>instr</Function><Other>(</Other><Function>request</Function><ASP Text>.</ASP Text><Function>servervariables</Function><Other>(</Other><String>"PATH_INFO"</String><Other>),</Other><String>"login.asp"</String><Other>)</Other><ASP Text> <= </ASP Text><Decimal>0</Decimal><ASP Text> </ASP Text><Keyword>and</Keyword><ASP Text> </ASP Text><Function>instr</Function><Other>(</Other><Function>request</Function><ASP Text>.</ASP Text><Function>servervariables</Function><Other>(</Other><String>"PATH_INFO"</String><Other>),</Other><String>"inset"</String><Other>)</Other><ASP Text> <= </ASP Text><Decimal>0</Decimal><ASP Text> </ASP Text><Keyword>and</Keyword><ASP Text> </ASP Text><Function>instr</Function><Other>(</Other><Function>request</Function><ASP Text>.</ASP Text><Function>servervariables</Function><Other>(</Other><String>"PATH_INFO"</String><Other>),</Other><String>"Data"</String><Other>)</Other><ASP Text> <= </ASP Text><Decimal>0</Decimal><ASP Text> </ASP Text><Keyword>and</Keyword><ASP Text> </ASP Text><Function>instr</Function><Other>(</Other><Function>request</Function><ASP Text>.</ASP Text><Function>servervariables</Function><Other>(</Other><String>"PATH_INFO"</String><Other>),</Other><String>"dropDown"</String><Other>)</Other><ASP Text> <= </ASP Text><Decimal>0</Decimal><ASP Text> </ASP Text><Other>)</Other><ASP Text> </ASP Text><Control Structures>then</Control Structures><br/>
<ASP Text>	</ASP Text><Function>Session</Function><Other>(</Other><String>"originalRequestedPage"</String><Other>)</Other><ASP Text> = </ASP Text><Function>Request</Function><ASP Text>.</ASP Text><Function>ServerVariables</Function><Other>(</Other><String>"PATH_INFO"</String><Other>)</Other><ASP Text> </ASP Text><Keyword>&</Keyword><ASP Text> </ASP Text><String>"?"</String><ASP Text> </ASP Text><Keyword>&</Keyword><ASP Text> </ASP Text><Function>Request</Function><ASP Text>.</ASP Text><Function>ServerVariables</Function><Other>(</Other><String>"QUERY_STRING"</String><Other>)</Other><br/>
<Control Structures>end if</Control Structures><br/>
<dsNormal></dsNormal><br/>
<Keyword>function</Keyword><ASP Text> countRecords</ASP Text><Other>(</Other><ASP Text> rsToCount </ASP Text><Other>)</Other><br/>
<ASP Text>	numRecs = </ASP Text><Decimal>0</Decimal><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	</ASP Text><Control Structures>do</Control Structures><ASP Text> </ASP Text><Control Structures>until</Control Structures><ASP Text> rsToCount.</ASP Text><Keyword>eof</Keyword><br/>
<ASP Text>		numRecs = numRecs + </ASP Text><Decimal>1</Decimal><br/>
<dsNormal></dsNormal><br/>
<ASP Text>		rsToCount.</ASP Text><Keyword>movenext</Keyword><br/>
<ASP Text>	</ASP Text><Control Structures>loop</Control Structures><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	rsToCount.</ASP Text><Keyword>close</Keyword><ASP Text> </ASP Text><Comment>' just to make sure nobody</Comment><br/>
<ASP Text>		</ASP Text><Comment>' tries to operate on the recordset,</Comment><br/>
<ASP Text>		</ASP Text><Comment>' which has already reached eof</Comment><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	countRecords = numRecs</ASP Text><br/>
<Keyword>end function</Keyword><br/>
<dsNormal></dsNormal><br/>
<Keyword>function</Keyword><ASP Text> unique</ASP Text><Other>(</Other><ASP Text> rs</ASP Text><Other>,</Other><ASP Text> sortColumn </ASP Text><Other>)</Other><ASP Text> </ASP Text><Comment>' return unique instances of text in sortColumn within rs</Comment><br/>
<ASP Text>	</ASP Text><Keyword>dim</Keyword><ASP Text> sorted</ASP Text><Other>()</Other><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	</ASP Text><Keyword>redim</Keyword><ASP Text> sorted</ASP Text><Other>(</Other><Decimal>1</Decimal><Other>)</Other><br/>
<ASP Text>	</ASP Text><Keyword>dim</Keyword><ASP Text> i</ASP Text><br/>
<ASP Text>	i = </ASP Text><Decimal>0</Decimal><br/>
<ASP Text>	</ASP Text><Control Structures>do</Control Structures><ASP Text> </ASP Text><Control Structures>until</Control Structures><ASP Text> rs.</ASP Text><Keyword>eof</Keyword><br/>
<ASP Text>		</ASP Text><Control Structures>if</Control Structures><ASP Text> </ASP Text><Other>(</Other><Keyword>not</Keyword><ASP Text> find</ASP Text><Other>(</Other><ASP Text> rs</ASP Text><Other>(</Other><ASP Text>sortColumn</ASP Text><Other>),</Other><ASP Text> sorted </ASP Text><Other>))</Other><ASP Text> </ASP Text><Control Structures>then</Control Structures><br/>
<ASP Text>			</ASP Text><Keyword>redim</Keyword><ASP Text> </ASP Text><Keyword>preserve</Keyword><ASP Text> sorted</ASP Text><Other>(</Other><ASP Text>i+</ASP Text><Decimal>1</Decimal><Other>)</Other><br/>
<ASP Text>			sorted</ASP Text><Other>(</Other><ASP Text>i</ASP Text><Other>)</Other><ASP Text> = rs</ASP Text><Other>(</Other><ASP Text>sortColumn</ASP Text><Other>)</Other><br/>
<ASP Text>		 	i = i + </ASP Text><Decimal>1</Decimal><br/>
<ASP Text>		</ASP Text><Control Structures>end if</Control Structures><br/>
<ASP Text>		rs.</ASP Text><Keyword>MoveNext</Keyword><br/>
<ASP Text>	</ASP Text><Control Structures>loop</Control Structures><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	</ASP Text><Keyword>redim</Keyword><ASP Text> </ASP Text><Keyword>preserve</Keyword><ASP Text> sorted</ASP Text><Other>(</Other><ASP Text>i-</ASP Text><Decimal>1</Decimal><Other>)</Other><ASP Text> </ASP Text><Comment>' the function will add an extra blank entry to the array</Comment><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	rs.</ASP Text><Keyword>Close</Keyword><ASP Text> 	</ASP Text><Comment>' close the recordset - we'll be using it again - and reset i - well be using it again, too</Comment><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	unique = sorted</ASP Text><br/>
<Keyword>end function</Keyword><br/>
<dsNormal></dsNormal><br/>
<Keyword>sub</Keyword><ASP Text> testSub</ASP Text><Other>(</Other><ASP Text> variable </ASP Text><Other>)</Other><ASP Text> </ASP Text><Comment>' do nothing impressive...</Comment><br/>
<ASP Text>	</ASP Text><Keyword>dim</Keyword><ASP Text> newVar</ASP Text><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	newVar = variable</ASP Text><br/>
<dsNormal></dsNormal><br/>
<ASP Text>	</ASP Text><Control Structures>if</Control Structures><ASP Text> </ASP Text><Other>(</Other><ASP Text> variable = </ASP Text><Keyword>true</Keyword><ASP Text> </ASP Text><Other>)</Other><br/>
<ASP Text>		</ASP Text><Function>response</Function><ASP Text>.</ASP Text><Function>end</Function><br/>
<ASP Text>	</ASP Text><Control Structures>else</Control Structures><ASP Text> </ASP Text><Keyword>%></Keyword><br/>
<dsNormal></dsNormal><br/>
<HTML Tag><p></HTML Tag><Normal Text>We are writing text.</Normal Text><HTML Tag></p></HTML Tag><br/>
<HTML Tag><p</HTML Tag><Identifier> class=</Identifier><Types>"stuff"</Types><HTML Tag>></HTML Tag><Keyword><%</Keyword><ASP Text>=newVar</ASP Text><Keyword>%></Keyword><HTML Tag></p></HTML Tag><br/>
<HTML Tag><p></HTML Tag><Normal Text>We have written text and outputted a variable.</Normal Text><HTML Tag></p></HTML Tag><br/>
<dsNormal></dsNormal><br/>
<Keyword><%</Keyword><ASP Text> 	</ASP Text><Control Structures>end if</Control Structures><br/>
<Keyword>end sub</Keyword><ASP Text> </ASP Text><Keyword>%></Keyword><br/>
