TAILIEUCHUNG - ASP.NET 4 Unleased - p 116

1124 CHAPTER 24 Advanced Navigation Remapping URLs The simplest way to remap a URL is to specify the remapping in your application’s web configuration file. For example, the web configuration file in Listing remaps the page to the page. LISTING The configuration file in Listing contains a element. This element can contain one or more elements that remap a page from a URL to a mapped Url. The mappedUrl attribute can contain query strings. However, it cannot contain wildcards. You can use the element only when performing simple page-to-page mappings. After. | 1124 CHAPTER 24 Advanced Navigation Remapping URLs The simplest way to remap a URL is to specify the remapping in your application s web configuration file. For example the web configuration file in Listing remaps the page to the page. LISTING xml version configuration urlMappings add url mappedUrl urlMappings configuration The configuration file in Listing contains a urlMappings element. This element can contain one or more elements that remap a page from a URL to a mapped Url. The mappedUrl attribute can contain query strings. However it cannot contain wildcards. You can use the urlMappings element only when performing simple page-to-page mappings. After you add the web configuration file in Listing to your application any requests for the page are modified automatically to requests for the page. It doesn t matter whether the page actually exists. If the page does exist you can never open the page. NOTE The tilde character has a special meaning when used with a path. It represents the current application root. A forward slash at the start of a URL on the other hand represents the website root. You can use the tilde only with properties of ASPNET controls. For example you can use it with the ASPNET Image control s ImageUrl property but you cannot use it with the HTML img src attribute. In code you can use the tilde character with a path by using the method. This method automatically expands the tilde to the application root. When working with remapped URLs you often need to determine the original URL that a user requested. For example you might want to display a message that tells users to update their bookmarks favorites to point to the new URL. From the Library of Wow eBook Remapping URLs 1125 You can use the following to determine the current URL Returns the original URL before being .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.