Localization of site maps in ASP.NET 2.0 development

Source: Internet
Author: User

In this article, we first briefly introduce the new site navigation mechanism provided by ASP.net 2.0, and note that the core of this new navigation function is to describe the navigation framework of the Web site in detail through an XML file. Obviously, the powerful features of this new navigation mechanism can greatly save programmers ' coding time. Next, we analyze the general idea of localization Web.sitemap by a simple example.

One, xml-based site map

The previous way to establish navigation in a Web application is to distribute a large number of hyperlinks on the page. But when developing large Web projects, this simple and primitive approach is extremely bloated and powerless. To this end, ASP.net 2.0 introduced a new navigation system to solve the whole problem. Although this new feature in ASP.net is very complex, we can control it from a wide range of method attributes that it provides.

This new navigation system defines the navigation system for the entire site through an XML file, which is called a site map. In this article, we want to skip over the basic discussion of this xml-based site map (Note: This article provides two sample projects, one of which is about displaying site maps based on XML, focusing on the localization of this new site navigation mechanism and providing a simple but complete sample project.

Localizing the system by modifying the resource file (. resx) is a good way to implement localization from desktop application development to ASP.net applications. Below, we will discuss this approach in detail.

II. building site Map-web.sitemap files for localization

You can apply localization directives to pages on ASP.net Web applications, or you can use the same ideas to complete localization tasks in Web.sitemap files.

Right-click Solution Explorer → add new Item ..., and then select the site Map template in the next Add New Item dialog box, as shown in the following illustration:

Figure 1. Create a site map file by clicking the site Map template

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.