Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
ASP.NET 4 Unleased - p 116
Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 116
Thúy Hằng
114
10
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
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 24.1 remaps the Home.aspx page to the Default.aspx page. LISTING 24.1 Web.Config The configuration file in Listing 24.1 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 24.1 remaps the Home.aspx page to the Default.aspx page. LISTING 24.1 Web.Config xml version 1.0 configuration system.web urlMappings add url Home.aspx mappedUrl Default.aspx urlMappings system.web configuration The configuration file in Listing 24.1 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 24.1 to your application any requests for the Home.aspx page are modified automatically to requests for the Default.aspx page. It doesn t matter whether the Home.aspx page actually exists. If the Home.aspx 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 Page.ResolveUrl 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 Request.RawUrl Returns the original URL before being .
TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã 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.