ASP.NET - master pages in database - Asked By waseem kaleem on 19-Dec-10 03:14 AM

Can we store master pages in database or content of master pages?What method is used to store entire website template in database?
thanks in advance
anil soni replied to waseem kaleem on 19-Dec-10 03:21 AM
Yes we can put are aspx file any anywhere. It is not at all mandatory to have are aspx page on the filesystem but to register any such other medium you have to implement a logic by deriving a VirtualPathProvider class and registering it Application_Start event.
There is also an article available on microsoft website describing the same just go through it

http://support.microsoft.com/kb/910441

Overview of the article

Article discuss about how to extend ASP.NET by providing virtual access to content and files for compilation in ASP.NET 2.0. This feature can be used to create applications similar to Microsoft SharePoint Portal Server, where the content is stored in a database instead of on the physical file system. In this article, we will build a sample where the content of the requested Web form page is stored in a Microsoft SQL Server database.
Anoop S replied to waseem kaleem on 19-Dec-10 02:11 PM
You can refer this post for loading master page content from database
http://forums.asp.net/p/1477034/3461061.aspx
http://stackoverflow.com/questions/1523073/asp-net-mvc-pull-and-populate-masterpage-contents-from-database