The inline scripting technique can be used to pass a variable to a piece of client side JavaScript. e.g.

<script language=”javascript1.1”>

 var jsuserid = <script runat=”server”>write(request.userid);</script>;

  ......

When this page is delivered to the browser the JavaScript variable ‘jsuserid’ will look as if it has been set to a constant value as the script server will replace the inline script code with the value of ‘userid’.

Comment on this topic

Topic ID: 150084