<% Dim objConn Dim objRec Dim sqlStatement Dim exturl ' if page is called by user clicking the external link on this page, save the url value and id of department that owns the link in database and then redirect the user to the external web page If Request.QueryString("exturl") <> "" Then Set objConn = Server.CreateObject ("ADODB.Connection") Set objRec = Server.CreateObject ("ADODB.Recordset") objConn.open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("to your Access Database") sqlStatement = "ExternalLinksViewed2" With objRec .Source = sqlStatement .ActiveConnection = objConn .CursorLocation = adUseClient .CursorType = adOpenKeyset .LockType = adLockOptimistic .Open End With objRec.AddNew objRec("ExternalURL") = Request.QueryString("exturl") objRec("Dept") = Request.QueryString("dept") objRec("DateViewed") = Now objRec.Update objRec.Close objConn.Close Set objRec = Nothing Set objConn = Nothing ' as of 2003-10-16, assume that any "&" embedded in the original exturl has been replaced with "~~" ' before redirecting, replace "~~" with "&" exturl = Replace(Request.QueryString("exturl"), "~~", "&") Response.Redirect(exturl) End If %> You are leaving the ????? Web site.

You are leaving the Anoka County Web site

<% If Request.QueryString("url") <> "" Then ' page has been called by a link %>

&dept=<%=Server.URLEncode(Request.QueryString("dept"))%>">Click here to go to:
<%=Request.QueryString("title")%>

Or:

Click here to return to the Anoka County Web site or simply use your browser's "Back" button to return to the previous page.

<% Else ' page called without parameters %>

This page enables visitors to go to an external Web site. Please use your browser's "Back" button to return to the previous page.

<% End If %>
Please Note: The Web site you want to go to is controlled by a different organization and Anoka County does not endorse, takes no responsibility for, and exercises no control over the organization or its views, or contents, nor does it vouch for the accuracy of the information contained on the destination Web site. (Read our Privacy Policy & Disclaimer)