asp.net - Dynamic nested master pages, shared properties -


I have a base master page that specifies the website's main layout template. It also handles some logic that changes the tab based on the section, and also sets page meta information.

I'm loading nested master pages dynamically by looking at the query string, loading a record from the database, and setting the nested master page based on the value found in that record I am I need to load dynamic nested master pages for layout and functional differences.

That record contains additional information that I want to use in the master master page and in the dynamically loaded master page so that I call additional databases.

Currently, I have established a class that inherits the masterpiece to work as a base class for the original master page. I have a share (static) property that represents the database call to the object that I want to share between the base master page and nested, dynamically the master page.

It works, but it seems a bit ugly. Is there a better solution?

You can always pass records in HttpContext. It is available for everything that is available in the archive collection archive, which can access the HTML contact for the duration of the request.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -