year ago, if someone had asked me to develop an interactive Web site, I'd have said, "Sure, me and what magic genie?" Fortunately, for those of us with little expertise in Web development, Dreamweaver MX is that magic genie. In this article, you'll see how to generate Dreamweaver MX server behaviors so you can display and interact with dynamic datawithout really knowing anything about how it works.
What Is a Server Behavior?
In Dreamweaver MX, the term behavior
refers to software-generated script that executes a specific task. The term server behavior
simply means the server executes the behavior script (instead of the client). Dreamweaver MX automatically generates the script necessary to perform these tasks, with just a little help from you. Behaviors automate several data-centric tasks, including:
- Displaying data, and letting users modify and navigate through the data.
- Searching the data.
- Restricting access to data.
The Server Behaviors
sidebar contains a list of server behaviors and a brief explanation about how you might use each type.
To get started, define a new site and create a connection to the data source. If you don't know how to build a connection, add a document, or create a recordset, search Dreamweaver MX's Help feature for these topics:
Setting up the Examples
- Connecting to a database
- Create and save a new page
- Creating a recordset without writing SQL.
Before you can insert a server behavior into a page, you must have a working connection to a database and a recordset object. The examples in this article depend on Microsoft technologies (Microsoft Access, ASP, IIS, and VBScript), but you can use other databases and other server-and-client technologies and languages.
- Internet Information Services (IIS) for the Web server.
- Active Server Pages (ASP) and VBScript to retrieve data.
- MS Access to store data. (We copied Northwind.mdb to a sample file directory C:\Inetpub\wwwroot\DreamweaverSampleFiles.)
- A Data Source Name (DSN) ODBC connection named NWJetfortheWeb.