Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Dreamweaver CS5 : Understanding Server Behaviors & Applying and Managing Server Behaviors

5/14/2012 4:31:15 PM

1. Understanding Server Behaviors

In contrast to Dreamweaver's JavaScript behaviors — with their numerous required functions and many more optional ones — a server behavior may be as simple as one line of code. The difference, and it's a key one, is that the code is intended to be executed by the application server, not the browser.

Another difference between server behaviors and JavaScript behaviors is that server behavior code may exist outside the bounds of the HTML page. Any page with a recordset has a section of code before the opening <html> tag, and a smaller block of code after the closing </html> tag. Dreamweaver automatically places the code in the proper place — and code placement is very important on the server side — when any of its standard server behaviors are used. Dreamweaver includes more than 25 standard server behaviors; the exact number varies for each server model. Figure 1 displays the available server behaviors for ASP.

Figure 1. Apply any server behavior from the Server Behaviors panel.

The Server Behaviors panel is the focal point for inserting, removing, and managing server behaviors. Unlike the Behaviors panel, which displays only the JavaScript behaviors attached to the selected tag, the Server Behaviors panel displays all the server behaviors included in the current page, in the order in which they were applied. Selecting a specific server behavior listed in the Server Behaviors panel highlights the attached page element, if visible in the Document window. Some server behaviors, such as Recordset, have their own Property inspector, whereas others display dynamic code as an attribute in a text or other Property inspector.

Although the simplest server behaviors can insert code without any additional user input, each built-in server behavior has a dialog box for specifying parameters. These vary in complexity from a single drop-down list to multiple-section dialog boxes with every type of input element available. As you learn in the next section, after you have inserted a server behavior, you can easily modify its parameters.

2. Applying and Managing Server Behaviors

If you have ever completed any Web applications in Dreamweaver, you've likely already discovered how to apply and update a server behavior. The Server Behaviors panel is the primary tool for inserting, modifying, and removing server behaviors. You can display the Server Behaviors panel in several ways:

  • Choose Window => Server Behaviors.

  • Select the Server Behaviors tab from the Application panel.

  • Use the keyboard shortcut, Ctrl+F9 (Command+F9).

The Server Behaviors panel remains available regardless of whether you are in Design view, Code view, or the split-screen Code and Design view.

2.1. Inserting and removing server behaviors

To add a particular server behavior to your page, click the Add (+) button in the Server Behaviors panel and select the desired behavior from the list. Many of the server behaviors have prerequisites — such as a recordset, form, or selected element — that must be in place before they can be installed, but these requirements vary from server behavior to server behavior. If you attempt to insert a server behavior and some precondition has not been met, Dreamweaver alerts you to the missing element; you are prevented from inserting the server behavior until all the required pieces are in place.

After you select the server behavior from the Add drop-down list, a dialog box appears to enable you to select or enter the needed parameters. Each dialog box is specific to the chosen server behavior, and they vary widely in terms of parameters offered and complexity.

Removing an existing server behavior is simple. Select the entry for the server behavior in the Server Behaviors panel and click the Remove (−) button. Dreamweaver immediately removes all the associated code without requesting confirmation.

With JavaScript behaviors, if you delete a page element that has a client-side behavior attached, you automatically delete that behavior. This is not always the case with server behaviors, and it's best to always use the Server Behaviors panel's Remove (−) button before deleting any associated text, graphics, or form elements.


2.2. Editing the parameters

To modify the attributes or parameters of an inserted server behavior, double-click its entry in the Server Behaviors panel. You can differentiate between multiple applications of the same server behavior in two ways. First, the entry for each server behavior lists one or two of its key attributes in parentheses. For example, a Dynamic Text server behavior applied to the LastName column in the rsMaillist recordset is displayed as follows:

Dynamic Text(rsMaillist.LastName)

Second, you can tell which server behavior is associated with which page element by selecting the server behavior — the associated text, graphic, or other page element is also selected in Design or Code view.

When the dialog box for a server behavior reopens, you can alter any of the parameters that remain active. In some situations, as with the Go To Detail Page server behavior shown in Figure 2, one or more fields may be disabled and so rendered unable to be changed. If you need to alter a disabled parameter, delete the server behavior and reapply it.

Figure 2. When modifying certain server behaviors, some fields, such as the Link field in this Go To Detail Page dialog box, are disabled and cannot be changed.
Other -----------------
- Dreamweaver CS5 : Packaging Your AIR Application
- CorelDraw X5 : Getting Artistic with Text - Formatting Paragraph Text
- CorelDraw X5 : The Text Bar and Special Paragraph Formatting
- Adobe Illustrator CS5 : Working with Illustrator Documents - Saving Files (part 2) - Saving as Illustrator EPS, Saving files as Adobe PDF & Saving files in SVG
- Adobe Illustrator CS5 : Working with Illustrator Documents - Saving Files (part 1)
- Adobe Photoshop CS5 : Working with Layers - Converting a Background into a Layer
- Adobe Photoshop CS5 : Working with Layers - Creating a Selection from a Layer & Creating a Layer from a Selection
- Adobe Fireworks CS5 : Improving Your Workflow - Thinking ahead: future-proofing your projects (part 2) - Using Fireworks files with Photoshop
- Adobe Fireworks CS5 : Improving Your Workflow - Thinking ahead: future-proofing your projects (part 1) - Metadata
- Adobe After Effects CS5 : The Timeline - Spatial Offsets
 
 
Top 10 video Game
-   Minecraft Mods - MAD PACK #10 'NETHER DOOM!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #9 'KING SLIME!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #2 'LAVA LOBBERS!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #3 'OBSIDIAN LONGSWORD!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Total War: Warhammer [PC] Demigryph Trailer
-   Minecraft | MINIONS MOVIE MOD! (Despicable Me, Minions Movie)
-   Minecraft | Crazy Craft 3.0 - Ep 3! "TITANS ATTACK"
-   Minecraft | Crazy Craft 3.0 - Ep 2! "THIEVING FROM THE CRAZIES"
-   Minecraft | MORPH HIDE AND SEEK - Minions Despicable Me Mod
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 92 "IS JOE DEAD?!"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 93 "JEDI STRIKE BACK"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 94 "TATOOINE PLANET DESTRUCTION"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 95 "TATOOINE CAPTIVES"
-   Hitman [PS4/XOne/PC] Alpha Gameplay Trailer
-   Satellite Reign [PC] Release Date Trailer
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
programming4us programming4us
PS4 game trailer XBox One game trailer
WiiU game trailer 3ds game trailer
Trailer game
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer