-
Content Pages
VS2005 Team Edition - C#
I'm new to using a master pages and have noticed odd behavior adding content pages. As far as I know, you right click the master page and select Add Content Page. This creates a new aspx and codebehind file without prompting for a name. So this forces me to perform the following steps every time I add a content page:
- Rename the aspx page (which renames the codebehind file)
- Change the class name in the code behind file
- Change the Inherits tag to the class in the aspx header
Seems like a lot of work doesn't it? Is there a better way?
-
Re: Content Pages
Yes, it is. You have not to use visual tools everywhere. You can simply define content place holder element in master page by hand in html source and assign a identifier to it. Than if you have a page (aspx) which you want to content of master page, edit html source again, define content element and set its id to the identifier. You can do it all by hand and I believe it is faster.
-
Re: Content Pages
Ok I found the way we're meant to do it:
New Item->Web Form and there is a checkbox near the bottom which says "Select Master Page".
Easy-peasey-lemon-squeezy ! :thumb: