Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!


Dreamweaver MX : The Hidden Tips


Troy Dreier
07/24/02

Go to page: 1  2 

Printer Friendly Version

We wanted to offer you something special for Dreamweaver MX, some tips that you wouldn't find by browsing the manual, so we went straight to MX's development team and asked them for their favorite gems. We told them that we wanted their favorite time-savers, things geared for intranet creation that would give our readers even more productivity for their working hours. And here's what they told us. Hope you like them.

Tip 1: The CSS Mode of the Property Inspector
Here's something not everyone will discover. When you have the Property Inspector open, select some text and click the "A" on the inspector. The Property Inspector will change modes, so that only Cascading Style Sheets styles can be added to the text, rather than the standard font tags, sizes, and so on. This should be a boon to developers creating sites with only CSS elements.

Tip 2: Auto-format XML Documents
In code view, start typing in a well-formed XML document (or else, open an existing XML document). You'll see that even without a document type definition (DTD) defined, Dreamweaver will parse the page and show relevant code hints based on the tags and attributes already placed on the page.

Tip 3: Working with ASP.NET
Developers, you'll notice that when working with the ASP.NET server model there is no menu option to create a dynamic list/menu. Here's the three-step solution:

  1. Create a blank page with the language set to VB or C#, depending on what was selected when defining the site.
  2. Create a database connection by clicking on Windows/Databases. In the Database panel click the "+" button and choose OLE DB Connection. Assign a name to your Connection. Click on Templates, then select Microsoft Access 2000 (Microsoft Jet 4.0 Provider). Fill in the necessary information for your connection, such as the path to your MS Access database. You will need to modify the connection information so that it looks similar to the following:

    Provider=Microsoft.Jet.OLEDB.4.0;
    Data Source=[databaseName];
    User ID=[username];
    Password=[password];

    Fill in the information similar to the following:

    Provider=Microsoft.Jet.OLEDB.4.0;
    Data Source=C:\databases\mydatabase.mdb;

    C:\databases is the path where the database located on the remote server. Note that if there is no username and password required to access the database, the User ID and Password fields can be deleted.

    Finally, click the test button to test your connection and then click OK if it tests successfully.

  3. Next, create the DataSet by clicking on Windows/Bindings. In this example, the DataSet is named DataSetDropDown. See the sample code below:

    Add <form runat="server"> on the page where you want to add the list/menu. Insert the asp:dropdownlist object between the <form runat="server"> and </form> tags. This object is located in the Insert > ASP.NET Objects menu.

    After you insert the asp:dropdownlist, click on Data to see a dialog box/

    You need to enter the Data Source, Data Text Field and Data Value Field information into each field. For testing purpose, you should enter the information into your Data dialogue box.

    Save the page and preview in the browser or view Live Data. The list/menu should be populated with data from the database.

    The source code of your final page should look close to the following:

    <form runat="server">

             <asp:dropdownlist
             DataMember="datamember"
             DataSource="<%# DataSetDropDown.DefaultView %>"
             DataTextField="LASTNAME"
             DataValueField="EMPLOYEEID"
             ID="dropdownlistid" runat="server">
             </asp:dropdownlist>

    </form>

For your information, here are definitions of each property listed in code example:

DataMember:
When binding data, this attribute specifies the table of a DataSet to use.

DataSource:
When binding data, this attribute specifies the data source to use.

DataTextField:
When binding data, this attribute specifies the field to use for item text values.

DataValueField:
When binding data, this attribute specifies the field to use for item-value values.

Go to page: 1  2 

Printer Friendly Version

Of Interest
· Intranet eXchange Discussion Board


email this page

Tutorials
and more at:
Intranet Journal's Tutorials
Intranet Journal Favorites

Creating a PHP-Based Content Management System

The Spyware Guide

Introduction to Microsoft SharePoint Portal

Intranet Journal
Part of the EarthWeb Network

Managing Editor
Intranet Journal

Tom Dunlap

EarthWeb Home Page
Jupitermedia Home Page

Media Kit




The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers