Interpretation ASP.NET Portal Starter Kit (2) - User Profile

xiaoxiao2021-03-05  27

ASP.NET Portal Starter Kit stores the configuration information required by the site in an XML configuration file (portalcfg.xml). These configuration information control the layout of the portal content (such as which portal's label, which portal modules displayed on each tab) and security settings (such as user category, access, etc.). Network administrators can reach the modified website layout and all module user access by modifying the configuration file. The benefits of storeing the configuration information of the site in the XML profile without being stored in the database: 1. Reduce the I / O operation of the database (because the configuration is set, it is rarely changed. Initialization Application Information One-time reading memory can greatly improve performance);

Let's take a look at what website's framework layout is, then look at how to use the user profile to implement the frame layout, the frame layout map is as follows:

The entire website consists of a framework of the top navigation bar and the leftmost right three user function modules, and ten feature templates are given by default: Announcements, Contacts, Discussion, Events (Events) , HTML Document (Image), Links, Quicks, XML / XSL, Document (Documents), Five Management Templates: Module Types, Roles, Label (Tabs), Site Settings, Managers (Manage Uses).

The table in the configuration file:

Global: Site Information Configuration Table

Field Remarks PortalID Site ID (Can be used to share multiple portals to share a database, distinguish by PortalID) PortalName Site Name AlwaysSshowEditButton always displays the editing button

Tab: Navigation Bar Label Information Table

Field Remarks Tabid Tab ID TabName Tag Name Accessroles Accessroles Access Role Taborder Taborder Tab Sort Source Shot SHOWMOBILE This label displays the name of MobileTabName on the "Mobile device browser" on the "Mobile device browser".

Module: User Module Table (Display Each Function Module on the Websites; such as quick link, announcement, etc.)

Field Remarks ModuleID Module ID ModuleTitle Module Name Editroles You Edit the function of the module MODULEDEFID associated user module definition table ID, indicating that the user module is that the PaName Number display is displayed in the "left middle right". Cachetimeout Cache Time ModuleRder display Sequential SHOWMOBILE display on "Mobile Device Browser"

ModuledEfinition: User Template Definition Table (Set User Template, implemented by that user control, the system gives ten user templates and five management templates by default, can be expanded)

Field Remarks MODULEDEFID Template ID FriendlyName Template Name DesktopsourceFile "Desktop Browser" User Control Source File Address Mobile File Address Mobile Source File Address

Settings and Setting: Set the address of the XML / XSL file and the image when the XML / XSL template and the picture template.

The relationship between the tables:

Method to realize:

When calling, the configuration information is obtained from the Global.asax file of the portal application by using the configuration transaction component. Next, configuration information is applied to the desktopdefault.aspx page of the portal (if a browser is accessible is an HTML desktop device) or the portal's MobileDefault.aspx page (if accessible is a mobile device) to provide one Tag view of the portal. When the TabID of the current page is displayed in the corresponding page display, the current page display page module is displayed according to PANENAME, displayed in different boxes. Specific code can be seen: Global.asax, DesktopDefault.aspx and Desktopportalbanner.ascx these files. More related content: Click here >>

转载请注明原文地址:https://www.9cbs.com/read-35565.html

New Post(0)