Master Pages ContentPlaceHolders AND Default page ContentPlaceHolders~

B

Brad Isaacs

Good evening friends,

Working with Visual Studio 2005, VB and ASP.NET 2.0

My website project contains a MasterPage.master that contains a Menu control
placed inside a table located inside ContentPlaceHolder2.

<%@ Master Language="VB" CodeFile="Master.master.vb" Inherits="Master" %>

<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">

<form id="Form1" runat="server">


The web site also contains a Default.aspx page which contains a
ContentPlaceHolder1, inside that ContentPlaceHolder1 I have a Tab MultiView
Menu. Code with Form tags
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master"

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

<form id="Form1" runat="server">

When I run my application, it fails because it tells me that I need a <form
id="Form1" runat="server">
in order to run the control.

I understand the reason behind the need to place the <form> tag around my
MasterPage.master ContentPlaceHolder2.

However, I encounter a problem when I load my web site, the web page now
contains nested <form> tags because I have a <form> tag within the
MasterPage, as well as the Default.aspx web page

Does anyone have any ideas of how I may get around this issue?

Any ideas / tutorials would be greatly appreciated,

Thanks in advance,

~Brad
 
B

bruce barker

on the master page, the content placeholder needs to be inside the form,
not before it.

-- bruce (sqlwork.com)
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top