Many commercial companies now have different departments, which have their own subsites on the company's website. In general, each department will maintain its own website according to its own needs. While this will make the company's Web site rich and colorful, but this will bring inconvenience to users, that is, because the various departments of the subsites are not consistent, so that users in browsing the site caused difficulties. Luckily, Asp.net2.0 provides us with a solution, which is the home page nesting.
Building a nested home page
First you need to set up a standard home page where you need to add some common items such as company logos, company names, footers, and menus, and each department's subsite must use this standard home page. Each department can build its own home page based on its own business needs, and then embed the homepage of these departments into the standard just established. This is good for the end user or for each department, and for the end user, no matter which department they visit, the same logo, menu, and footer will be seen. For the department, they can build a built-in home page that can be based on the business needs of their department. It's like an OCX control embedded on a Web page.
To understand how to build a nested home page, let's look at an example. First, give an example of a standard home page.
The following is a reference fragment:
<%@ Master language= "C #" autoeventwireup= "true"
Codefile= "WebsiteMasterPage.master.cs" inherits= "Websitemasterpage"%>
<title> Standard Homepage Example </title>
<body>
<form id= "Form1" runat= "Server" >
<table width= "100%" >
<tr>
<TD bgcolor= "#006633" colspan= "2" >
<table border= "0" cellpadding= "0" cellspacing= "0" width= "100%" >
<tr>
<TD align= "Left" >
<a href= "/masterpage/default.aspx" >
</a>
</td>
<TD align= "Right" >
</td>
</tr>
</table>
</td>
</tr>
<tr>
<TD width= "25%" >
<font color= "#3300FF" > Department 1 <br/> Department 2 <br/></font>
</td>
<TD width= "75%" >
<asp:contentplaceholder id= "Main" runat= "Server" >
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<TD colspan= "2" > </td>
</tr>
<tr>
<TD bgcolor= "#0000FF" colspan= "2" >
<font color= "#FFFF00" > Footnotes </font>
</td>
</tr>
</table>
</form>
</body>