Reputation: 14764
How to make controls float freely on asp.net webpages? It was some setting to be changed in visual studio right?
Upvotes: 2
Views: 35070
Reputation: 1
First select the control you want to move around --> goto Format tab--> Set Position --> Select Absolute.
Upvotes: 0
Reputation: 11
Select your (tool) I mean the one you dragged into your page, then change the view from <Design>
to <Source>
, after that search for the word "style" in your selected code. And then type this:
... style="position:absolute; ....;"
inside the tags.
Then, when you change your view again to the view, you'll find that the (tool) has become movable! With grid lines to tell you x and y inside your web page.
Upvotes: 1
Reputation:
relative positioning and absolute positioning can move the element freely but relative positioning is relative to the actual positionn of the element and moving it from there... Absolute positioning is the one which move completely any where around the page by providing the left top values.
Upvotes: 0
Reputation: 5226
It was MS_POSITIONING="GridLayout" in the body tag. But this is removed since Visual Studio 2005.
You can imitate this result by doing the following:
Tools - Options - HTML Designer - CSS Positioning - Positioning Options, and setting it to absolute positioned.
UPDATE:
Visual Studio 2008:
Tools - Options - Html Designer - CSS Styling - Change positioning to absolute for controls added using Toolbox, paste or drag and drop.
Upvotes: 4
Reputation: 187020
Its better if you design your web page through HTML code in the source editor rather than dragging and dropping items from the tool box. By this you can have a structured design even when your page is viewed in different resolutions.
There is no harm with the solution provided by @Ivan Zlatanov if you wish drag and drop controls.
Upvotes: 1
Reputation: 25197
Do you mean setting the css positioning to relative instead of absolute?
Upvotes: 0