Using Dreamweaver MX with Visual Studio.NET

Some developers are a little unsure as to which tools to use to build ASP.NET websites. A common practise is to use Dreamweaver MX to build the page layout, and then open the pages in VisualStudio.NET to do the coding. DW MX is a good tool to give one a visual representation of a web page. One can build the table structure and add the server controls in MX before opening the page in VS.NET. VS.NET on the other hand, has very poor design tools. However, it is very good when it comes to handcoding. Intellisense is a major advantage in using VS.NET.

When starting on a new site, put all the files into a new folder and create a virtual directory. To do this, right-click on the folder select 'Properties'. Then select the Web Sharing tab and share the folder by giving it an alias. eg. MyNewWebsite.

 

Once the virual directory has been created, one can create a new site in Dreamweaver MX. The Testing Server Folder will point to the new folder that was created earlier. Note how the URL prefix points to the alias that was given to the folder,



Next a new Project in VisualStudio.NET is created. Type in the location of the Project, it will be the same as the URL prefix that was given in Dreamweaver MX.



A new page can be created in Dreamweaver MX. Once the layout has been built, one can open the page in Visual Studio. To do this, right-click on the file and select 'Include In Project'. When promted to create codebehind files, click 'yes'. Visual Studio will then automatically assign definitions to the web controls that were added in MX. Now one can do the coding for the page in VS.

One can also modify pages in MX that have been opened in VS. For example, if one adds a new textbox in MX <asp:textbox id="textbox1" runat="Server" />, then one can re-open the page in VS. VS will then automatically add the definition:

protected System.Web.UI.WebControls.TextBox textbox1;

By default, MX does have some trouble recognising some ASPX and ASCX pages. I have outlined some these issues in an article on my website. Kevin Marshall also has an extension on his website to address some of the issues.

AddThis Social Bookmark Button

Related Links

Extensions About me Articles Downloads Portfolio

Products

Charon Cart 3 Extension Charon Cart.NET v2 Multi-lingual Application Charon Cart 2 Extension