views:

597

answers:

7

I have never really found the design view in Visual Studio useful when developing aspx pages, and so I basically never use it.

Am I missing something or is it just one of those features that isn't particularly useful? Do you use the design view? If so, how do you find it useful? If not, why not?

A: 

I dont use it to layout controls as it is quite slow but they have improved it in vs2008. I do find it saves a bit of time dragging a user control onto it but would prefer to lay controls out properly as it genrates some dirty html.

Saying that we recruited 2 developers recently who insist on using it so each to their own.

alexmac
You know you can drag from the toolbox out into HTML view, right? :)
Brad Wilson
A: 

I generally like to use to as a quick check for does my CSS/HTML look reasonably well prior to checking it in a real browser. It is also handy for simple text manipulation when you want to just enter raw HTML, i.e. editing your HTML resume.

Apparently the new VS 2008 designer has alot of new features for CSS, they may be worth looking at in greater detail. They are mostly directed at dreamweaver esque functionality to allow you to manage/apply styles and CSS.

That said I am using VS 2008 and almost view it under the split view that allows me to see the design and markup at the same time.

Good luck.

smaclell
Does it still magically reformat all your HTML when you switch between design and code view? 2003 and I'm pretty sure 2005 did that. It put newlines in places where they shouldn't have been, and caused perfectly valid code to break
Orion Edwards
Okay I just did a really rough test and it did not mess up my html.I created both an HTML and ASP.NET pages, added the following<div><p><span>Does this do</span> what it really should do?</p></div>and then switched between the markup and design views.Hope that helps.
smaclell
I remember it being more subtle than that. If you wanted to have <asp:SomeControl>\n<div>\n and so on, then it would decide to shift your div up to the same line as the asp control, and then add a line-break around 80 characters or somesuch. They may well have fixed it, which will be a great thing
Orion Edwards
Mmm good to know thank you for sharing.
smaclell
+2  A: 

I only use it to auto-generate event methods in the code behind by double clicking on buttons, etc. It saves some time compared to writing it manually.

jesal
+8  A: 

Is the design view for aspx pages in Visual Studio useful?

It surely is, if you fit one of these profiles

  • You don't know HTML or CSS
  • You don't care if your HTML is readable or valid
  • You don't care if your site renders properly in anything other than IE

It is however, my humble opinion that if you fit any of the above profiles, you are either:

  • Being forced at gunpoint into building a webpage when you have no interest whatsoever in such things.
  • A failure
Orion Edwards
A: 

I only use it for bringing up SmartTag on things like GridView, DetailsView, and DataSource rather than generating all the tedious BoundField and Template controls by hand. Usually, this is only the first time it's configured. Afterwards I generally edit the mark up by hand because I convert some BoundFields into my own BoundField-derived class that supports different types of validation.

tvanfosson
A: 

It's useful only if you are trying to generate your button click events the quick way, your page-lifecycle events the easy way, or to set up your demoware controls (like the gridview, the datasources, etc).

Other than that, leave it be.

Even when you do want to use it, use split view if possible (like in 2008), as it prevents Microsoft form 'improving' your formatting for you.

Jeff
A: 

I use it and I use the CssClass attribute in 2010 to specift a class in the css file. that way it's neat and displayes well(in all browsers) also if you are using a menu item or etc you can just specify a different css color etc in your cssclass attribute for skinning (also the use of themes etc) each time vs comes out I also learn things that I would otherwise not have used but which turn out to be usefull like the Membership model, CreateUser Wizard etc.

Shane