Page layout in VS 2005?

D

David Veeneman

I'm just getting started with ASP.NET in Visual Studio 2005. The last web
work I did involved ASP 3.0 in FrontPage.

I've been through the MSDN tutorials on creating web pages, but not of them
seem to cover real-world page layout. In the ASP era, I used tables to
provide a structure for a page, then coded HTML controls within the grid.

So, my first question is: Are pages laid out the same way in ASP.NET--start
with a table and add controls?

I tried using the ASP.NET Table control like a TableLayoutPanel in Windows
Forms, but the table doesn't accept control drops. That leads me to believe
VS 2005 must have a better way of structuring a page.

BTW, I'm familiar with Master Pages, and I plan to use them as soon as I get
proficient at laying out basic web pages in VS 2005.

That brings me to my second question: Are there any good tutorials out there
on web page layout procedures using VS 2005? I've done a Google search, but
I don't see anything that looks like it walks through real world examples.
I'm not concerned about design at this point; I just want to get a page laid
out.

Thanks in advance.
 
J

Jeff

Remember that Web browsers haven't changed much in the past few years...
they are for the most part expecting plain old HTML. Using VS.NET to create
that HTML doesn't change anything from the browser's point of view. The
browser doesn't know or care about how the HTML was created (VS.NET,
FrontPage, etc). So, you basically have two ways to do page layout: table
layout and CSS-P.... just like if you were doing everything manually, with
Dreamweaver, FrontPage, or whatever. VS.NET doesn't change that fact. It
might write crappy table layouts for you... but at the end of the day it's
still plain old HTML with table layouts and/or CSS. My suggestion is to
stick with Dreamweaver or FrontPage (or even Notepad) for HTML-specific
work; and VS.NET for all code-behind programming work.

-FWIW
 
B

Bruce Barker

table layout is still the best. vs2005 went from vs2003's failed grid mode
drag and and drop (trying to look vb forms) to good support for html editing
in the html window (not design). a future product will give a more visual
editor.

-- bruce (sqlwork.com)
 
D

David Veeneman

Thanks-- That's what I was looking for. It sounds like the best approach is
to drag out a table andcontrols in design view, then move controls into the
table in the HTML view. Have I got it right?
 
D

David Veeneman

Now this is making more sense! For the benefit of anyone else researching
this issue, here is why the table control wouldn't accept controls dropped
on it: ASP.NET has *two* table controls; a server-side table (in the
Standard section of the VS 2005 Toolbox), and an HTML table (in the HTML
section of the Toolbox). I was dragging the server-side table onto a grid
and trying to drop controls on that. Use the HTML table, and you can drop
controls on it just fine.

Better yet, in Design View, select Insert Table from the Layout menu. It
brings up a dialog where an HTML table can be configured. Select 'Template'
at the top of the dialog, and you get a drop-down list of page-layout
tables. The rest of the Layout menu has a number of options for configuring
and formatting layout tables.
 
D

David Veeneman

Let me answer my own question: That's not quite it. Tables can be laid out
in Design view, and the Layout menu has a number of options to assist with
this task. See my answer to my original question. If you are having trouble
dropping controls on a table, make sure you are using an HTML table, not a
server-side table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top