[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can't place toolbox items where I wan't them (freeform) on the .aspx page

Posted on 2008-11-12
5
Medium Priority
?
240 Views
Last Modified: 2013-11-26
Hi Experts,
I am a super-newbie just learning Visual Studio and I'm trying to create a .aspx web page, but I can't get the toolbox elements (i.e. labels, textboxes, etc.) to go where I want them on the design page? Is there some setting that allows you to place them freeform on the page?

Thanks,

taduh
0
Comment
Question by:taduh
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:samtran0331
ID: 22942611
What you're referring to is what Visual Studio called "Grid Layout" (as opposed to the default "Flow Layout")

For web development, using Grid Layout (which in html terms really translates to "absolute positioning")...is just not that common anymore.

In VS2005, you can re-enable Grid Layout (I'm not sure if it's the same in VS2008, but should be...)
Try going to the "Tools" in the main VS toolbar,
then "Options"
then in the tree view on the left, scroll down to "HTML Designer" and there should be a "CSS Positioning" node and check the first checkbox ("Change positioning to the following...") and then in the dropdownlist, choose "Absolutely positioned"

That's where it is in VS2005...I'm not in front of VS2008 at the moment...but if the option is available...it would be in the same spot...

With that being said, if you are a newbie to web development (not just Visual Studio)...I would recommend you read up on CSS and html design and layout instead of using Absolute Positioning.

0
 

Author Comment

by:taduh
ID: 22943513
samtran0331,

If you don't use absolute positioning, how do you get elements on the page where you want them?

taduh
0
 
LVL 37

Accepted Solution

by:
samtran0331 earned 2000 total points
ID: 22943899
taduh,

What you're wanting to learn is not a simple task that can be easily answered in one question on a forum...
And the techniques are not something can be mastered quickly...

With web programming, your 3 options are (in order of "desireability"):
1. CSS
2. Tables
3. Absolute positioning

This is a fairly long article on general (not ASP.Net specific)  form layout:
http://www.sitepoint.com/article/fancy-form-design-css/3/
I posted the link to page 3 of the article because it is the first direct example of controlling positiong using css.
You can see how the labels are placed next to the textbox using css.
Using CSS for all your layout needs is probably the most ideal way to do things, but it is also the most difficult...you basically need to learn to be a web designer before you learn to be a web developer...but it gives you the most flexibility for changes and most compatability...
Here's another example:
http://www.texotela.co.uk/code/css/fieldsetform/

And a google search for more:
http://www.google.com/search?q=css+form+layout&sourceid=ie7&rls=com.microsoft:en-US&ie=utf8&oe=utf8

Option 2 is probably the most common way to layout web forms.
You would use an html editor to create an html table with the correct cells on how you want your form to look and then place controls into the table cells.
Many ASP.Net controls like the gridview and detailsview and formview...when they render their final html, it is using html <table> tags to maintain their layout.

You simply will not find many web applications and web sites that use absolute positioning...even though it is the easiest way to layout a page.

If you're a "super-newbie" as you claim...I would suggest you head on over to www.asp.net
they have a ton of tutorials and videos on how to work with ASP.Net...
and they also have starter kits here:
http://www.asp.net/community/projects/

so if you pick one of those apps, you can see how the forms are layed out as well as how asp.net works...and I can almost guarantee none of those samplse are using absolute positioning...
0
 

Author Closing Comment

by:taduh
ID: 31516132
samtran0331,
I was led to believe that with Visual Studio you could just drop and drag controls where you wanted them, but I can see now that this is a much more complex issue. Guess that why people go to school to learn all this stuff. Thanks for your candid response.

I'll check out some of the websites you recommended.

taduh
0
 
LVL 37

Expert Comment

by:samtran0331
ID: 22944456
>>Guess that why people go to school to learn all this stuff.

The funny thing is, I did get a degree on "this stuff"...but honestly, everything useful I've learned that allows me to work and be good at what I do....has not been learned from a class room.

So I don't want to make it sound like this stuff is "impossible" to learn without going to school.

As a "super-newbie"...I would recommend you d/l either the Small Business Starter Kit, Personal Site Kit, or the club site kit...

Get it up and running and see how they did things and layed things out...

Good luck!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

873 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