New to Master Pages using VS 2008 Web Developer

T

Ty

Hello,
I have made a Master Page that basically consists of a table with 2
rows and 3 columns. The first row spans all 3 cols to form a header.
The first column in the 2nd row is being used as a vertical menu. The
2nd & 3rd columns of the second row are joined to make one large cell.

So for visualization picture a page with a header and a vertical menu
on the left side with a large open space to the right of the menu.

I placed the content holder into the large cell. I created a new form
referenced to the master page. All is good so far.

The content holder on the new form looks like long textbox. I had
originally thought that I would just drag the controls on to the
content holder and position them as I liked however the problem is
that the content holder does not act like a form as I thought where
you could drag controls on and position them as you want so now I'm
stuck.

Can you place a new form into the area just like a web form so that
you can drag and position controls as you like? How would you do that
as form is not an option in the toolbox?

Is there another way to accomplish this. I tried adding a table with 1
row and expanded it to create the large work space but you cannot drag
control onto the table. they always place themselves before the table
in the content holder area. This is very frustrating. It seems counter
productive to not allow random placement of controls inside the
content area.

Hoping for help

Ty
 
M

Mark Rae [MVP]

I have made a Master Page that basically consists of a table with 2
rows and 3 columns. The first row spans all 3 cols to form a header.
The first column in the 2nd row is being used as a vertical menu. The
2nd & 3rd columns of the second row are joined to make one large cell.

Sounds like you don't actually need the third column...
I placed the content holder into the large cell. I created a new form
referenced to the master page. All is good so far.

Alas not... ASP.NET pages can have only one server-side form and, in the
case of a MasterPage / content page scenario, it goes in the MasterPage, not
the content page...
Can you place a new form into the area just like a web form so that
you can drag and position controls as you like? How would you do that
as form is not an option in the toolbox?

No -see above...
 
D

David Wier

The main reason for only one form is the difference in the paradigm, going
to DotNet - since it's an Object Oriented/Event Driven platform, there is no
need to have more than one....
Each button you put on the form (all within the same ONE form tag) has its
own event - therefore, you can do all the things you think you need multiple
forms for, with multiple buttons inside one form

This enormously opens your options, over the old "one form one page"
paradigm

I hope this helps

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
 
T

Ty

It does make sense but I guess I'm stuff with what is the
alternative.....using tables within the content area to hold the
controls and adding the controls through code to position where you
want them since you cannot drag controls onto a table?

It almost makes me wonder why bother I mean the nice thing about web
forms is the ability to drag and drop controls If I lose that then I'd
be better off just creating a user control or copying the base code
for the menus onto each form.

Ty
 
M

Mark Rae [MVP]

It almost makes me wonder why bother I mean the nice thing about web
forms is the ability to drag and drop controls If I lose that then I'd
be better off just creating a user control or copying the base code
for the menus onto each form.

The whole point of using MasterPages is precisely so you *don't* have to
copy the base code for the menus onto each form - because there's only *one*
form, and it lives on the MasterPage...
 
D

David Wier

Then, every subsequent Content page "inherits" the form from the Master
page.
For every page, the event handlers of the buttons (or whatever) on each page
govern what's 'submitted'.

It's no longer a one form/one submit button submission process in Object
Oriented/Event Driven programming.

I know when I first started using ASP.Net in the 2000/2001 years, I had done
some VB4/5/6 programming, but since I was mainly using Classic ASP, it was a
little hard getting my head around this concept.
But once I did 'get it' - I pulled a regular Homer Simpson ("Doah!") and
then, I realized I just went from a two lane blacktop to a hundred lane
freeway, concept wise

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top