Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Nuestro buen amigo JC Olamendy, publico un artículo interesante, aquí los detalle:
ASP.NET master pages and Facelets templating
Introduction
Templating is the feature in Web technologies to define complex layouts for the Web applications. Templating enables the creation of common structure and look and feel across all the pages in the Web application. A template does not define the content; rather it defines placeholders for contents and provides the layout, orientation, flow, functionality, structure and logical organization of the elements of the Web site. For example, one popular layout places a navigation menu and logos on the left side or the top of the site, a copyright notices on the bottom of the site, and the content in the middle. This might be difficult to maintain a standard look if you always put the common pieces in places with every web page. So using a templating solution, you enable to separate the content from the presentation of the content as well as providing a solution which is flexible and easy to maintain.
In this article, I will illustrate how to implement templating solutions using Facelets templating and ASP.NET master pages.
Templating solution with ASP.NET master pages
Through the concept of master page, ASP.NET technology implements its own templating solution. A master page is a page which comprises tags and controls shared across all the pages of the Web solution. Master pages contain placeholders known as ContentPlaceHolders where the content from child pages will go. When the user requests the content of a page, then ASP.NET merges the output of the content of the child pages with the output of the master page.
Now let’s illustrate the master pages concepts with an example. For this solution, we’re going to use Visual Studio.NET 2008 and ASP.NET MVC which my favorite framework to develop Web applications in Microsoft.NET technologies, although these concepts can be applied to Web forms as well.
Open Visual Studio.NET 2008 and select the File | New | Project menu option. The click on the ASP.NET MVC application (see Figure 1).
Ver el articulo completo aquí.
Saludos
Fernando García Loera (Community Program Manager – Latin America Region)




