% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp4m7b.asp&srcfile=Interaction/ClientScript" %>
ASP is a server-side scripting environment. Client-side scripting complements ASP nicely, allowing for a number of enhancements, such as ActiveX™ controls, that can make your application more powerful and user-friendly.
This example demonstrates how you can include a client-side script in your language. This script defines a subroutine called DoIt within the <SCRIPT> tags. Notice that there is not a RUNAT=SERVER attribute present, which would indicate that the script is an ASP subroutine. The page provides one button for the user that, when clicked, executes the DoIt subroutine on the client browser.
This sample demonstrates a very useful advantage to combining ASP scripts with client-side scripting. When ASP encounters the <SCRIPT> tags, it does not simply ignore everything within that block. It continues to search for, parse, and execute script elements, specified with delimiters (<% ... %>), that are meant for the server. This example, therefore, returns the session information returned from the Session.SessionID method within a client-side script.