Creating Dynamic Web Sites with .Net and Dreamweaver MX

Over the last two years Microsoft has been funneling billions into developing and promoting it's new technology: .Net.

In this article you will learn how to format Macromedia's Dreamweaver MX to work with .Net for your Microsoft Web Servers. By the end of this article you will be able to program a .Net web site.


Enabling Dreamweaver to use .Net

When you start dealing with databases nothing is simple. Dreamweaver goes a long way to remove the complexity of data driven sites - but there are still a few gotchas you have to work out.

The first gotcha comes before you even set up Dreamweaver. To develop in Microsoft's .Net you need to have installed on a Windows 2000 server the Microsoft .Net Framework. The .Net Framework is the complete set of tools the server needs to be able to translate your code correctly. Installation instructions and the files you need to download can be accessed at http://msdn.microsoft.com/netframework/. You will find a lot of information on .Net as a technology solution at this site (great for those nights when you can't get to sleep).

You can think of .Net as an expansive plugin to your Windows 2000 Server. Internet Information Server, the tool that delivers web pages for you, will not visually change. You can still go into the tool and create new web sites. The difference is that Internet Information Server will now support ASP.Net and ADO.Net. In Figure A you can see a site that has been set up on a computer. This site, called "MXZone", and it will be a .net Site.

Figure A: Internet Information Server, IIS, is used to create a new web site on Windows XP.

With a web site created and your server now supporting the .Net Framework you can now set up Dreamweaver.

Open Dreamweaver. Select Site, New Site&. This will open the Site Definition Window. Select the basic tab as shown in Figure B.

Figure B: The Site Definition Window configures Dreamweaver to work with web servers and application environments

You will be prompted to name you site. Give it the name "My First .Net Site."  Select Next.

The second screen, shown in Figure C, asks you which server technology you wish to use. Choose ASP.Net C#.

Figure C: There are seven different server technologies that can be used through Dreamweaver MX

Click the "Next" button. You will now be asked to choose where you will be developing your site. In this article I will be choosing to develop on my own computer, Figure D. For your own programs you will need to consult with your Web Managers to find out the location of your companies web sites.

Figure D: The web server can be anywhere on your network on one that you have access to through FTP.

Click the next button. For the testing URL field enter the name of your web site. If the site is a sub website then you will need to add the full site address, as shown in Figure E.

Figure E: The location of the site.

Click Next and choose "No" for sharing. Click Next again. The final screen is a Summary of the content you have added, as shown in Figure F.

Figure F: A Summary of your site's information.

You are almost to the point where you can develop in ASP.Net. The last step you need to take is to move some files that will allow Dreamweaver MX files to communicate with the .Net server. Go to Site, Deploy Supporting Files& A pop-up window will open. Select OK. A file, called DreamweaverCtrls.dll is moved to the web server. This is a one time only move. You will not have to do it again.

You now have the environment set up to allow you to create ASP.Net pages. The next step is the ADO.Net connector.

Matthew David

Matthew David has been developing Flash based applications for over 6 years (that makes him very old in this business!). Examples of his work can be found at his web site www.matthewdavid.ws, or you can email him directly at mdavid@email.com.

Matthew’s most recent publications include content for Flash 5 Magic, Inside Dreamweaver 4, Flash 5: Visual FX, Web Publishing Bible and The Dreamweaver Bible. You can also see him popping up in many online magazines, such as Sitepoint.com, Windowatch.com, UDzone.com and DevX.com.

Currently, Matthew is working on two books and writing articles for Element K Journal’s Macromedia Solutions magazine. He is a available as a freelance consultant to work on web based projects.

See All Postings From Matthew David >>

Comments

Now I'm confused.

November 21, 2002 by Owen Eastwick

I'm looking to make the transition from ASP/VBScript to ASP.net. Naturally I want to use the best possible variation and implement best practices from the outset. So which language should I choose VB.net or C#?

Here it states: C# is worth learning as it typically performs 10x faster than VB.Net.

However in this article: http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=185, it states:
What language is the "best" language choice? If you are a VB wizard, should you take the time to learn C# or continue to use VB.NET? Are C# ASP.NET pages "faster" than VB.NET ASP.NET pages? These are questions that you may find yourself asking, especially when you're just starting to delve into .NET. Fortunately the answer is simple: there is no "best" language. All .NET languages use, at their root, functionality from the set of classes provided by the .NET Framework. Therefore, everything you can do in VB.NET you can do in C#, and vice-a-versa. The only differences among languages is merely a syntactical one.

The two articles are completely contradictory - so which is right?

RE: Now I'm confused.

November 21, 2002 by George Petrov
Hi Owen, I have to agree with you as both C# and VB.NET code gets compiled to the CLI (Common Language Infrastructure) they generated almost identical CLI code. So they really run at the approx same speed. I think David had it a bit wrong in its article. In the past this was true for C++ and VB - but not anymore in .NET

RE: RE: Now I'm confused.

November 21, 2002 by Owen Eastwick

Thank you George, that's a relief, while I believe there are still many differences I imagine that moving to VB.net from ASP/VBScript is a slightly smaller step than from ASP/VBScipt to C#.net.

RE: RE: Thanks for the tut. My dreamweaverMX still is not working with .net

December 3, 2002 by Matthew David

Hazelnut,

I just saw your question. I want to make sure that I have the following informtion correct:

  • you are running windows 2000
  • you have installed .NET 1.0
  • you are running MDAC 2.6+
  • you have Dreamweaver configured to develop for ASP.NET

As with ASP the .NET world can be a huggling act. I just want to make sure that everything is correct.

Matt

See all 9 Comments

You must me logged in to write a comment.