Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

@Register and MasterPage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bryanp10@hotmail.com - 27 Jun 2007 23:12 GMT
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.   ????
Mark Rae - 27 Jun 2007 23:29 GMT
> 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...

Signature

http://www.markrae.net

bryanp10@hotmail.com - 28 Jun 2007 00:13 GMT
> <bryan...@hotmail.com> wrote in message
>
[quoted text clipped - 14 lines]
>
> --http://www.markrae.net

So maybe a better question is...  why the heck did Microsoft implement
MasterPages like this?  :)
Mark Rae - 28 Jun 2007 00:27 GMT
> 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.

Signature

http://www.markrae.net

bruce barker - 28 Jun 2007 01:18 GMT
if you want it on every page, then use the web.config controls section.

-- bruce (sqlwork.com)

> 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.   ????
Sergey Poberezovskiy - 28 Jun 2007 01:28 GMT
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..

> 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.   ????

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.