asp.net2.0 to implement home page nesting

Source: Internet
Author: User

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>
&LT;TD bgcolor= "#006633" colspan= "2" >
<table border= "0" cellpadding= "0" cellspacing= "0" width= "100%" >
<tr>
&LT;TD align= "Left" >
<a href= "/masterpage/default.aspx" >

</a>
</td>
&LT;TD align= "Right" >

</td>
</tr>
</table>
</td>
</tr>
<tr>
&LT;TD width= "25%" >
<font color= "#3300FF" > Department 1 <br/> Department 2 <br/></font>
</td>
&LT;TD width= "75%" >
<asp:contentplaceholder id= "Main" runat= "Server" >
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
&LT;TD colspan= "2" >&nbsp;</td>
</tr>
<tr>
&LT;TD bgcolor= "#0000FF" colspan= "2" >
<font color= "#FFFF00" > Footnotes </font>
</td>
</tr>
</table>
</form>
</body>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.