@Register and MasterPage

  • Thread starter Thread starter bryanp10
  • Start date Start date
B

bryanp10

Why does the @Register directive not carry over into templated pages?
I have to @Register the user controls I want to use on every page...
this seems contrary to the whole point of master pages to begin
with. ????
 
Why does the @Register directive not carry over into templated pages?
I have to @Register the user controls I want to use on every page...
this seems contrary to the whole point of master pages to begin
with. ????

One of the major misconceptions with MasterPages is that they are somehow
the ASP.NET 2 equivalent of framesets - they aren't at all...

MasterPages are nothing more than UserControls...

When you add a MasterPage to a content page, you are just adding a
UserControl - the content page is the "main" page, not the MasterPage...
 
One of the major misconceptions with MasterPages is that they are somehow
the ASP.NET 2 equivalent of framesets - they aren't at all...

MasterPages are nothing more than UserControls...

When you add a MasterPage to a content page, you are just adding a
UserControl - the content page is the "main" page, not the MasterPage...

--http://www.markrae.net


So maybe a better question is... why the heck did Microsoft implement
MasterPages like this? :)
 
So maybe a better question is... why the heck did Microsoft implement
MasterPages like this? :)

As an easy way to provide a uniform structure to pages within the same site.
 
if you want it on every page, then use the web.config controls section.

-- bruce (sqlwork.com)
 
You can always register you controls within web.config - this way they will
appear registered on every page within your site. As Mark said master pages
serve different purpose..
 

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

Back
Top