views:

11

answers:

2

Just curious,

I remember way back in the ASP.Net 1.0 Visual Studio 2002? days you could just drag a web control onto your visual web form interface to where you wanted it and it would fill in all the CSS styling to make sure that control was in the right spot when viewing the app in a browser.

Did that go away? I haven't used it in years as I have been hand coding stuff, but for some quick and dirty prototyping I thought it might be useful. Is that capability gone, or do I need to enable that somewhere?

Thanks for your time.

A: 

That was a horrible, disgusting feature that they got rid of for excellent reason. It used absolute positioning to place the control at the particular point on the page, as though the page were a VB6 form. It produced horrible, unmaintainable results.

John Saunders
+1  A: 

In ASP.NET 1.0 - 1.1 the style attribute was automatically added but in ASP.NET 2.0 onwards this is not a default behavior.

However here is a workaround

  1. To set the style properties for each control you add
  2. [VS2010]You can set Tools->Options->HTML Designer->CSS Styling

Check -> Change positioning to absolute for controls added using Toolbox, paste or drag and drop Choose -> Auto Style Application

geocine
That is what I needed, thanks.
infocyde