Hello All, I'm new to this asp.net coding, but am familiar with Object Oriented languages like c++ and Java. My companies current website is written in ColdFusion and asp with some JavaScript thrown in just for good measure. Needless to say maintance to the
site, or adding new functionality, can be a little bit of a headache. From the little bit of reading that I've done on ASP.NET, I remember reading that aspx pages are objects, and that one can create a template page and inheritate that into other pages, giving
all pages the same look and feel, but different content. I was curious as to how hard this is to accomplish, or if anyone could point me in a direction to learn how to do this (syntax and such). Preferably a website, or a post on these boards (or others) that
I missed doing a search. Thanks, DSimmon
I have followed your link, and downloaded the example. Seems easy enough to understand. I ran the .bat file which compiled the .cs file into a .dll if I understand correctly. Then I opened WebMatrix and ran the .aspx file. WebMatrix opened it's own webserver,
and MSIE to the .aspx file, but I get an error.
Parser Error Message: Type 'Microsoft.Web.Samples.MasterPages.ContentContainer' does not have a property named 'MP:CONTENT'.
Line 13: </script>
Line 14:
Line 15:
Line 16:
Line 17:
Now I think this is because the MasterPages.cs namespace does not define a class CONTENT, but it does loop through a
foreach (Content content in _contents)
in class
public class ContentContainer : PlaceHolder, INamingContainer
.
Do I need to define a
public class Content
before it is used, or is something wrong... Thanks, David
DSimmon
Member
390 Points
84 Posts
Page Inheritance
Nov 21, 2003 06:55 PM|LINK
bleroy
All-Star
15617 Points
2302 Posts
Re: Page Inheritance
Nov 21, 2003 09:34 PM|LINK
----
This posting is provided "AS IS" with no warranties, and confers no rights.
DSimmon
Member
390 Points
84 Posts
Re: Page Inheritance
Dec 01, 2003 08:05 PM|LINK