Is it possible to register a user control in a code-behind page so that all pages which derive from it will have the control built-in? If so, what's the syntax? Any caveats?<BR><BR>Much obliged -<BR>Jeff
i probably don't fully understand what you are trying to do...<BR><BR>but i have a lot of aspx pages on my application i am developing where i have an <asp:placeholder> and from code behind i dynamically "fill" that placeholder with a user control... if that sounds like something that can help, its a simple use of the "Controls.Add" method, a la<BR><BR>Footer.FindControl("Module1").Controls.A dd(LoadControl("/common/modules/articleNewest.ascx"))<BR>
Thanks for the info - I guess I'm basically trying to create a page template in code-behind, complete with UI elements in the form of user controls, and then have the pages on my site inherit it... is that clear? Possible?
It is possible... rant follows:<BR>I am working on a site at the moment where a tree of base classes adds all kinds of stuff. I didn't write it and it has a serious bug. <BR><BR>I didn't want to use it, but it wasn't my choice... I did not want to have any of the design compiled (aka full separation of logic and presentation).<BR><BR><BR>