Home / Articles / Adobe Dreamweaver / Developing ASP.NET Applications with Macromedia's Dreamweaver MX 2004

Developing ASP.NET Applications with Macromedia's Dreamweaver MX 2004

Article Description

Macromedia's Dreamweaver has long been known as the premiere web site design tool for web professionals. But did you know that Dreamweaver allows you to build web applications that leverage J2EE, ColdFusion, and Microsoft .NET, among others? Matthew David introduces you to the exciting world of developing applications built on ASP.NET.

Connecting to a Database

Before you can connect to a database you need to create an ASP.NET page. To do this choose File → New. The window, shown in Figure 10, will pop up.

Figure 10

Figure 10

You'll want to choose Dynamic from the category list and then ASP.NET VB from the Dynamic Page list. Choose Create. Dreamweaver then opens a blank page formatted for ASP.NET. The file does not yet have a name, so you'll need to go to Select File → Save to give the file a name. Call it test.aspx. You now have a valid ASP.NET page in your site. The next step is to create a connection to the database.

You will need to open the Database window. Next, select Window → Database. As you haven't set up a database yet, you will see a checklist of things you need to do to have the database connected correctly. This checklist is shown in Figure 11.

Figure 11

Figure 11

Fortunately, you've already done a lot of the hard work and most of the settings have been completed. All you need to do is connect to the database. In the Database window choose the + symbol and select OLE DB Connection. This will open the OLE DB Connection window.

Dreamweaver uses Connection Strings to connect to Access, SQL Server, and Oracle databases. Fortunately, you don't need to remember how a connection string is created because Dreamweaver has templates built for you. In the OLE DB Connection window, choose Templates from the right-hand side and select Microsoft Access 2000 from the list. The following will be inserted into the "Connection String" field:

Data Source=[databaseName];
User ID=[username];

But, you don't need all of this information. To connect to the Northwind database all you need is:

Data Source=

To test the connection, you must first give the connection a name. You can name the connection "NW_CONN." Once you have done that, select the Test button and you will make a successful connection, as shown in Figure 12.

Figure 12

Figure 12

The database, with expandable tables, views, and store procedures will now appear in the Tables window.

Now you are finally ready to begin developing. This may seem like a lot of work for the setup, but, now that you are here, you will not need to do this for each and every page. Now you can begin building solutions.

4. Building a database driven page | Next Section Previous Section