Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize function Navigation in ASP.NET Web Development Framework

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "ASP.NET Web development framework how to achieve functional navigation", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "ASP.NET Web development framework how to achieve functional navigation" bar!

The main problem of function navigation is how to layout the function and how to arrange the function to the page reasonably. A popular solution now is the navigation of the left and right structure, with a tree menu on the left and a detail function on the right. The effect of the implementation is as follows

The interface of the same version of Cmax S program also appears with the same effect.

Web click on the tree node on the left and open the corresponding function list on the right to show what functions are under that node. These functional nodes are designed and implemented with menu designer to facilitate customers to customize the main interface. The menu designer is designed in the following style

There are many ways to realize the mother-child relationship of tree nodes. One way is to add a ParentId to each node of the tree to indicate its superior node, so that each designed node needs to indicate its parent node in order to present the mother-child relationship. Another way, take the implementation in this example as an example, 1002 is the tree node of Sales, and its child nodes are all identified by 1002XX, as shown in the figure above, 100201 represents journal, 100202 represents report, and 100203 represents query. For the former method, refer to table X _ Menu in the framework database, and for the latter, refer to table UserGroupMenu.

Another purpose of navigation is to achieve automatic switching between Chinese and English to facilitate different user preferences. The components of the Enterprise Solution series are built-in to switch between Chinese and English, which can be set in Settings by choosing the customary language. For Web applications, the user's language preferences are saved in the browser's Cookie, and for the Cmax S program, the user's language preferences are saved in the registry.

Let's take a look at how to quickly find the function you need and open it to execute it. If you are used to looking in the menu on the left, you can turn on the feature directly in the function list area on the right of the menu. Another way is to enter the function code in the Quick launch bar, click the Go button, and it will open the function in the new options page. In general, the system is preset with three types of functions.

Page function; report; Custom query

How to make an ASP.NET page become a function point and be automatically found by the system framework? Please refer to the following example code

[Function ("AIITRL", "~ / module/note.aspx") public partial class note: EntryPageBase {protected override void PageLoadEvent (object sender, EventArgs e) {if (! IsPostBack) TransactionType = "BlotterEntity"; base.PageLoadEvent (sender, e);}}

Add the Function feature to the page. The * parameter is the function code, and the second parameter is the absolute address of the page. When you enter AIITRL in the Quick launch bar, the frame finds (reflects) the page and opens and loads this feature in a new tab page.

One drawback to mention here is that for ASP.NET, it is requested by the browser. Unlike Cmax S, you can new a form and then Show. I've been looking for a way to find the address of the aspx file where the page is located by the type of page, so that the second parameter of the Function feature can be omitted, and so far no viable solution has been found. The second parameter can be assisted by the menu designer, but the principle is similar to that here, and it is also identified manually, so I put the address directly in the feature parameter for navigation.

The second type of function is the report. First design the report in report designer and give it a number, as shown in the following figure

In the report design form, give the basic parameters. Then place the report file in the report directory of the Web project. In theory, three popular reporting systems need to be supported. RDLC, Microsoft client report, simple, easy to use, Crystal Report Crystal report, complex and powerful, Reporting Services Microsoft server-side report. At present, the Enterprise Solution Web part only realizes the RDLC client report, and the other two report functions need to be studied and realized. One thing to mention here is to add a type of report to achieve the following basic functions:

1 multilingual basic Chinese, English, traditional

2 more than one version. There are multiple versions of Crystal Report, so you need to be able to recognize each version of the report file and load the appropriate renderer (Render).

(3) interface input and value transmission. Some reports need to pass parameters, and the system needs to create interface input values, which are automatically passed into the report.

The third type of function is custom query. For the query designed by the user in the query designer, the Web framework should be able to parse into an interface and present it to the user.

The query designed here is presented to the user with the following effect by entering the PUPRSQ function code in the Quick launch bar

The results of the query can be exported as EXCEL. The principles of how to convert query to Web interface will be explained in subsequent articles, which will be skipped here.

The navigation function has a certain impact on the availability of the system. Just imagine, the function of a very complex system, users to find a function, can not find it for a long time, or there is no quick way to find it, users will not think it easy to use. Secondly, the design of the quick launch bar uses a function code to identify a function module that the user needs, which is helpful for the user to perform the required function quickly. If advanced users do not want to look in the tree node, they can perform the function in this way.

The navigation menu is editable and provides a menu editor to design the effects that users want.

At this point, I believe that everyone on the "ASP.NET Web development framework how to achieve functional navigation" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report