Parameters in server behaviors

Parameters in server behaviors

You can include parameters in a server behavior’s code, and let the page designer supply the necessary parameter values before inserting the server behavior’s code into the page. To let the page designer supply parameter values, enter parameter markers within the code as shown:

@@parameterName@@

The example ASP server behavior below contains the parameter formParam, which requires the person inserting the behavior to supply the name of a form object:

<% Session("lang_pref") = Request.Form("formParam"); %>

To create a parameter that lets the user supply the necessary value:

  1. Enclose the formParam string in parameter markers:
    <% Session("lang_pref") = Request.Form("@@formParam@@"); %>
    
  2. Create a dialog box that prompts the designer to supply the name of the form object. For more information, see Creating a dialog box for a custom server behavior.


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Defining Sources of Dynamic Content
Developing Applications Rapidly