|
|
#1 |
|
Fanatic Member
Join Date: Mar 04
Posts: 521
![]() |
Hi all,
I have a masterpage which contains three content place holders. Please note that all three content place holders are named something different. See code: Code:
<%@ Master Language="VB" CodeFile="site.master.vb" Inherits="site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Phi beta Sigma Fraternity, Inc. - Delta Xi Sigma chapter</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<link href="styles/style3.css" media="screen" rel="stylesheet" title="CSS" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="container">
<!-- Begin Masthead -->
<div id="masthead">
<img alt="" height="66" src="images/logo.gif" width="150" /><p>office (000)
000-0000<br />
fax (000) 000-0000<br />
toll-free (000) 000-0000</p>
</div>
<!-- End Masthead -->
<!-- Begin Navigation -->
<div id="navigation">
<ul>
<li><a href="default.html">Home</a></li>
<li><a href="about/about.htm">About</a></li>
<li><a href="news/news.htm">News</a></li>
<li><a href="products/products.htm">Products</a></li>
<li><a href="services/services.htm">Services</a></li>
<li><a href="calendar/calendar.htm">Calendar</a></li>
<li><a href="contact/contact.htm">Contact</a></li>
</ul>
</div>
<!-- End Navigation -->
<div id="page_content">
<!-- Begin Left Column -->
<div id="column_l">
<!-- #BeginEditable "content" -->
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
<h2>Headline 2</h2>
<p>insert content here</p>
</asp:ContentPlaceHolder>
<!-- #EndEditable -->
</div>
<!-- End Left Column -->
<!-- Begin Right Column -->
<div id="column_r">
<!-- #BeginEditable "sidebar" -->
<asp:ContentPlaceHolder id="ContentPlaceHolder2" runat="server">
<h3>Headline 3</h3>
<p>insert content here</p>
</asp:ContentPlaceHolder>
<!-- #EndEditable -->
</div>
<!-- End Right Column -->
</div>
<!-- End Page Content -->
</div>
</form>
</body>
</html>
Code:
<%@ Page Title="" Language="VB" MasterPageFile="~/site.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> </asp:Content> Thanks, Strick |
|
|
|
|
|
#2 |
|
Elite Member ®
Join Date: Aug 02
Location: RUH
Posts: 8,063
![]() ![]() |
:
try removing the "#" sign in the commented code .
__________________
|
|
|
|
|
|
#3 |
|
Fanatic Member
Join Date: Mar 04
Posts: 521
![]() |
Re: Duplicate names in masterpage error
Wow I think that solved it. That's weird that something commented out was causing that problem.
Thanks for your help, Strick |
|
|
|
|
|
#4 |
|
Elite Member ®
Join Date: Aug 02
Location: RUH
Posts: 8,063
![]() ![]() |
I had same problem before and it was weird for me too . I think the compiler take the hash "#" as preprocessor directive.
__________________
|
|
|
|
|
|
#5 |
|
ASP.NET Moderator
Join Date: Feb 02
Location: Ulaan Baator GooGoo: Frog
Posts: 38,150
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: [RESOLVED] Duplicate names in masterpage error
That's entirely unexpected, good find.
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|