Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am wondering if I should rely on Visual Studio in adding HTML and CSS elments by using the viusal toolbars or should I write them by myself? Is it considered bad practice if I relied on Visual Studio to do that?

share|improve this question
up vote 6 down vote accepted

The way I usually work when there's a choice between using a tool that will add code for me or writing the code by hand is to use the tool when I'm just starting out but then fairly quickly move onto editing the code directly.

Having moved in to Silverlight in the last couple of years I had to learn a whole new UI language - XAML. So in the first instance I used the visual designer in VS2008/VS2010 and then in Expression Blend to create my first UIs. Once they were created I then went to the text editor to tweak the designs and remove any unnecessary code - usually extra grids.

Now I'm comfortable writing XAML from scratch in the text editor (though having InteliSense and auto-complete helps!), but I use the visual designer when I need to.

The visual tools are a great way to get something on the screen quickly, but you should always double check the code it produces. If nothing else you'll be in a better position to understand why something isn't working as you expect.

share|improve this answer
I had the same experience with XAML, although I was frustrated with VS after about 10 minutes and did a split screen. Edit the XAML and see the change. – Ken Henderson Aug 5 '11 at 1:44

I wouldn't consider this to be bad practice. You use an IDE to help you write code with higher productivity; therefore you should use its features.

I would recommend that you know how to read and write HTML/CSS if you're a web designer/developer; that way you won't have to depend on a tool that you may not always have available to you.

share|improve this answer

Use it but know it. In other words, don't just press the "I believe" button on whatever IDE or tool you are working with. Utilize the Rapid Application Development aspects, but when it comes time to troubleshooting you should be able to read the IDE-generated aspects and go from there.

Knowledge is power, but automation is speed. The combination of them is even greater than either separately.

share|improve this answer

I suppose it depends on the level of control you want... my experience is that slapping something together quickly is usually accomplished by the IDE drag-and-drop tools.

If you've used MVC, you'll know what I'm talking about. It doesn't have designer support, so it forces you to write a layout from scratch. You're not doing it completely blind though, because MVC's pattern is almost a guide to ensuring your view renders neatly.

As others here mention, it's the obvious starting place if you're new to Web Forms. The more you use it, the more you realize that you'll be tweaking minor changes and eventually, you'll be exposed to all the common elements you'll write from scratch one day.

Best of luck.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.