TAILIEUCHUNG - ASP.NET 4 Unleased - p 119

Các trang trong Ví dụ 26,6 sử dụng Cascading Style Sheets (CSS) để thay đổi sự xuất hiện của các mẫu đăng nhập do người điều khiển đăng nhập. Bằng cách lợi dụng Cascading Style Sheets, bạn có thể tùy chỉnh sự xuất hiện của điều khiển Đăng nhập bằng mọi cách mà bạn có thể tưởng tượng. | 1154 CHAPTER 26 Using the Login Controls font-size 12px text-align left padding 10px .login_button border solid 1px black padding 3px style title Show Login title head body form id form1 runat server div asp Login id Login1 InstructionText Please log in before accessing the premium section of our Website. TitleText Log In TextLayout TextOnTop LoginButtonText Log In DisplayRememberMe false CssClass login TitleTextStyle-CssClass login_title InstructionTextStyle-CssClass login_instructions LoginButtonStyle-CssClass login_button Runat server div form body html The page in Listing uses Cascading Style Sheets CSS to change the appearance of the login form rendered by the Login control. By taking advantage of Cascading Style Sheets you can customize the appearance of the Login control in any way that you can imagine. NOTE For the complete list of properties supported by the Login control see the Microsoft .NET Framework SDK Documentation. From the Library of Wow eBook Using the Login Control 1155 Automatically Redirecting a User to the Referring Page If you request a page that you are not authorized to view the Framework automatically redirects you to the page. After you log in successfully you are redirected back to the original page that you requested. When you are redirected to the page a query string parameter named ReturnUrl is automatically added to the page request. This query string parameter contains the path of the page that you originally requested. The Login control uses the ReturnUrl parameter when redirecting you back to the original page. You need to be aware of two special circumstances. First if you request the page directly a ReturnUrl parameter is not passed to the page. In that case after you successfully log in you are redirected to the page. Second if you add the Login control to a page other than the page the ReturnUrl query string parameter is ignored. In this case you