Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Dreamweaver and Visual Studio

Posted on 2005-02-24
Medium Priority
Last Modified: 2008-01-09

Is there any way I can use both visual studio .net and macromedia dreamweaver together to build asp.net web sites. I want to use the helpfull coding environment of visual studio but want to use dreamweaver for the graphics end of things. For example I want to create a page and do all my graphic editing using Dreamweaver such as adding fireworks images/buttons, flash movies etc. Then I want to code my page, for example add an onpage handler that will do something like validate user data etc. There's other great thing in dreamweaver also such as template pages etc. I want to be able to ultise all these features but do my coding in Visual studio because of the added benefits it provides such as intellisense etc.

Can this be done. Anyone point me in the right direction. It would be great to get the best of both worlds.
Question by:auk_ie
  • 4
  • 3
  • 2
  • +2
LVL 16

Expert Comment

ID: 13399915
I use both. Without a problem. VS.net 2003 and MM DW MX2004.

Author Comment

ID: 13400272
Hi OliWarner

Can you explain to me how I would create a template file in dreamweaver and then use visual studio to add a C# class and create an OnPage handler.

When I try this I get all sorts of errors
LVL 16

Expert Comment

ID: 13400438
a template? like a proper dreamweaver template? you shouldnt need to use them if you've got access to including files
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 13401775
DW and VS2003 works together like a charm. I use DM to do all the HTML, CSS and Javascript, and the VS2003 for the codebehind files. Don't use DW templates, can get realy messy quickly!


Expert Comment

ID: 13401911
Here is my "me too", and a few quick pieces of advice that work for me.....

1) if you use source safe I suggest letting VS handle the source control. Check out the files and then work on them with dreamweaver where VS puts them. Both products will handle source safe, but confusing things can happen if you juggle.

1a) VS and source safe lack a good FTP client for deploying sites to servers. Dreamweaver on the other hand does not. I do a release build or even a partial debug build and dreamweaver can then "put" them up to the server with two clicks.

2) don't use dreamweaver's check in/check out if you can avoid it. Let VS do that stuff via source safe. Ignore anythng you can that makes extra files including notes

3) The sreamweaver "site" settings: I use the file share path of the directory I made by generating the c# project or opening it from an existing web and having it coppied over as my "Local" directory for DW. I then set the testing directory as close to or as that home directory.  I use the typical setup, so the local and test directories double up for me. Then set your destingation FTP to someplace yo'd ike to mirror the project to use that spare FTP feature :)

4)  As for your templates: right now go to google and paste in "WilsonTemplatesIntro". That and a few smart related things you will pull up should provide you with a toolbox that far exceeds what you were doing with DW templates. And these objects can render at least as placeholders in design view of both systems. Not perfect to the pixel matches all the time maybe, but darned good.

That should give you a great weekend's worth of fun.
Now I'll go back to quietly waiting for sailing season.


Expert Comment

ID: 13405943
If you are open to a diferent way, i have a diferent proposition...
because i use to make web sites that way (VS + Dreamweaver )
but  i try out Visual Web Developer 2005 Express Edition Beta

and feels like VS when coding and like expert's Dreamweaver when designing
you can downloadit while still beta for free, and eventually it will cost about 100USD, ...
try to NOT to use any C#2.0 features so you can deploy it on a .NET 1.1 IIS


Author Comment

ID: 13412049
Hi guys some very nice opinions. I want to recap on some of the points made and some of the problems I see

The procedure to create an application using these tools would be as follows
1) Create a C# website using VS Studio (for eg called MyWebsite), This will create a folder at C:/Inetpub/MyWebsite/ and also create a solution file for me at My Documents/My Projects/MyWebsite/MyWebsite.sln
2) Now the dreamweaver part, I simply create a New Site and set the local root folder to C:/Inetpub/MyWebsite/ and set the Server Model to ASP.Net.

The problem here is that in the C:/Inetpub/MyWebsite/ folder VS.net has created a whole load of files in here already such as the C# project file etc. Dreamweaver picks up on these files so thinks they are apart of the website so will upload them to the remote server if I use its ftp features. A big no no. How can I get around this?

3) So now that I have the project set up. I want to create a web page. The procedure I've tried is as follows, I create a page in dreamweaver the way I want it to look, add my forms etc.

4) Now its time to add C# code to the page. So in VS.net I add the page MyWebPage.aspx to the project and all the referenced images. Upon adding the page  VS.net kicks out the message "There is no class file in the project associated with the Web Form 'MyWebPage.aspx'.  Create a new class file now? Yes/No". So I hit yes to create a code file for the page, i.e. MyWebPage.aspx.cs. That's cool so now I can add code to this file using VS.net

This is where I get confused.
What does building the project do in VS.net?
Why would a Web Page need to be built?
What is the build the .cs built file into and how does this affect my deployment?  
What is MyWebpage.aspx.resx for?
Laslty My dreamweaver edited pages look crap in the VS.net Designer. This is not a big problem as they are rendered OK in the browser but still it woulld nice to have a resolve for this?

PS: fromeroj, why did you swap to Visual Web Developer 2005, Is this not a cut down version of VS.net, and does it have the html editing ppower of dreamweaver?

LVL 16

Accepted Solution

OliWarner earned 1800 total points
ID: 13413777
>> A big no no. How can I get around this?
Uploading the source isnt such a bad thing. IIS is well trained in not serving source files. It will not do it unless you explicitly change the settings to pump out sourcefiles.

>> Why would a Web Page need to be built?
It doesnt, but VS.net is just trying to push code-behind techniques of having a class file and a webpage which inhertis the class and uses it like that. Technically cleaner.

>> What is the build the .cs built file into and how does this affect my deployment?
the .cs is the C# Source file for the codebehind. It IS the codebehind file.

>> What is MyWebpage.aspx.resx for?
Just a buildtime file. Shouldnt be any use for it once its out and about.

VS.net does make a lot of junk up when it comes to projects, but this is only to cover its back. There's no compiling as such in development things like this, so if you ask me, i would add VS.net to the list of editors in Dreamweaver and when you want to edit a .net page in studio, just right click the file in DW, and open in VS. That way you wont get all the junk in your build dir, but you wont get all the power of VS.

When you're making new things I have found the best way is to make it in a separate dir and move it over when its ready.

For clarification, when using codebehind techniques, you need the class.cs or class.vb and a "front" page for it like class.cs.aspx...
It could well be the other way around: source: class.aspx.cs and front: class.aspx. Both are valid.
.cs files will not be shown to users.
LVL 16

Expert Comment

ID: 13413785
Whoops missed a couple =)

>>What does building the project do in VS.net?
Nothing, just saves the source and loads IE up at the right page.

>>Why would a Web Page need to be built?
They dont. They just need to be saved.

Assisted Solution

headless_monkeyman earned 200 total points
ID: 13415310
Most of your questions will answer themselves if you study up a tiny bit on how asp.net works at runtime. I reccomend that you read the first tutorials on www.asp.net or www.got.net or the help files that come with Matrix (avilable at asp.net). There are really two primary ways that .net code is compiled... and it is easy for smart folks to miss this piece of info because we tend to automaticly skip the baics in a new set of toys by skipping past the "overly easy" first few lessons.

What it comes down to is that in .net you can make single file pages that do not have procompiled logic in code behnd pages (dreamweaver's method) or you can split the logic into two tiers, content (.aspx) and behavior (.cs + .resx such as VS does).  My standard preference is to compile my logic using the code behind method, but to still keep the content editable by dreamweaver and even content management systems I develop that use Contribute (long before Macromedia started selling such an idea themselves I was making round trip content editing systems using my own code and then Contribute once it got up to the task). This makes it easier for my project teams to maintain seperate development schedules for the content and engine teams.  And precompiling makes the stuff run faster.

That said, if i were making something that was strictly  a one man site that was going to run on a single server for a small to mid sized business I'd probably do single page code and maybe not use VS at all!  

Finally, because my girlfriend reminds me that 1) i don't collect EE points (don't accept any of my answers please) and 2) its sunday which means poetrey, donuts and mourning Hunter S this week and 3) i'd better shave if i want to live I will point out to you as I say goodbye two features of DW you will want to be familiar with... First is the Cloaking feature. Takes care of your FTP issues. If you don't understand what a file is for, cloak it. This stops it from joining the FTP queue. You can cloak .cs .resx and .scc just for starters. Second is Site:Advanced:Deploy Supporting Files. This dumps out a .dll which has some of DW's featues precompiled into it which you will be needing.

Last but not least, DW's database access is a little "half baked" to be honest. So be sure and use VS for that part. Takes a little longer to learn it right, but you can always up your hourly rate to make up for it later :)

Time for my social life!


Author Comment

ID: 13416022

Had fun reading your post the most. However what do you mean hourly rate? I'm only doing this for a bit of fun. I guess thats why you have a girlfriend and I don't.

Regards Asad

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question