|
-
August 9th, 2006, 05:26 AM
#1
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?
-
August 9th, 2006, 10:50 AM
#2
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.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
-
August 10th, 2006, 05:48 AM
#3
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 !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|