The application method of metabuilders in ASP.net FORUMS2.0

Source: Internet
Author: User
ASP.net had heard a friend complained ASP.net FORUMS2.0 because the use of metabuilders make the code is not intuitive, ah, the advantages have disadvantages, use this control purpose
is the unified interface.

For example, in the management page will generally be divided into two columns, in the asp.net may be more commonly used methods are two, one is to use the framework, there is a
Use a ASXC that shows the left side to unify.
So what happens after you use the metabuilders? I think it's almost like using a frames page, but there's no columns,
The page looks like a whole, the page becomes a container, contains some other pagination, this approach is more than using ASXC to unify the page
For ease of management.
In the Thems\adminmasterpage.ascx
<table width= "100%" cellspacing= "7" >
<tr>
&LT;TD valign= "Top" width= "170" >
<forums:adminnavigation runat= "Server"/>
</td>
&LT;TD valign= "Top" >
<mp:region id= "admincontent" runat= "Server" ><p>default main content</p></mp:region>
</td>
</tr>
</table>
On the right side of the page, he defines the id= "admincontent."
This means that at this point you don't know what your left side is, this is a container.
This should be a more common calling mechanism in asp.net forums, which is to directly tune one of the contents and then find the Anti-tune superior container
Then take admin\sitesettings.aspx as an example
This file is called directly in the hyperlink, but the file is only displayed on the right, and he
<mp:contentcontainer runat= "Server" id= "Mpcontainer" masterpagefile= "~/themes/adminmasterpage.ascx" >
To find his parent container.
Pass
<mp:content id= "admincontent" runat= "Server" >
Indicates that he will replace that component in the parent container.
By the way, the code separation method that we contacted today is different from the previous one, which used to find the skin through the class, and these few are not skin
Directly with their own CS file, and then there is a corresponding entity class in the components.


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.