tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 83

Professional in C# and Visual Basic Part 83. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 16 Membership and Role Management Listing 16-13 Providing a login for the end user using the Login control @ Page Language VB html xmlns http 1999 xhtml head runat server title Login Page title head body form id form1 runat server asp Login ID Login1 Runat server asp Login form body html In the situation established here if the unauthenticated user hits a different page in the application he is redirected to the page. You can see how tracks the location in the URL from the address bar in the browser http localhost 18436 Membership ReturnUrl 2fMembership The login page using the Login control is shown in Figure 16-7. Figure 16-7 From this figure you can see that the Login control asks the user for a username and password. A check box allows a cookie to be stored on the client machine. This cookie enables the end user to bypass future logins. You can remove the check box and related text created to remember the user by setting the Login control s DisplayRememberMe property to False. In addition to the DisplayRememberMe property you can work with this aspect of the Login control by using the RememberMeText and the RememberMeSet properties. The RememberMeText property is pretty 777 Chapter 16 Membership and Role Management self-explanatory because its value simply defines the text set next to the check box. The RememberMeSet property however is fairly interesting. The RememberMeSet property takes a Boolean value by default it is set to False that specifies whether to set a persistent cookie on the client s machine after a user has logged in using the Login control. If set to True when the DisplayRememberMe property is also set to True the check box is simply checked by default when the Login control is generated in the browser. If the DisplayRememberMe property is set to False meaning the end user does not see the check box or cannot select the option of persisting the login cookie and the RememberMeSet is

TỪ KHÓA LIÊN QUAN