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

Professional in C# and Visual Basic Part 84. 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 Protected Sub Page_Load ByVal sender As Object ByVal e As .ToString End Sub script html xmlns http 1999 xhtml head runat server title Login or Logout title head body form id form1 runat server asp LoginStatus ID LoginStatus1 Runat server p asp LoginName ID LoginName1 Runat server Font-Bold True Font-Size XX-Large p p There are asp Label ID Label1 Runat server Text 0 users online. p form body html C @ Page Language C script runat server protected void Page_Load object sender EventArgs e .ToString script When the page is generated it displays the number of users who have logged on in the last 15 minutes. An example of what is generated is shown in Figure 16-14. Figure 16-14 You can see that two users have logged on in the last 15 minutes. This 15-minute period is determined in the file from within the membership element membership userIsOnlineTimeWindow 15 membership 787 Chapter 16 Membership and Role Management By default the userisOnlineTimeWindowis set to 15. The number is specified here in minutes. To increase the time window you simply increase this number. In addition to specifying this number from within the file you can also set this number in the file. Dealing with Passwords Many of us seem to spend our lives online and have username password combinations for many different Web sites on the Internet. For this reason end users forget passwords or want to change them every so often. provides a couple of server controls that work with the membership service so that end users can either change their passwords or retrieve forgotten passwords. The ChangePasswordServer Control The ChangePassword server control enables end users to change their passwords directly in the browser. Listing 16-21 shows a use of the ChangePassword control. Listing 16-21 Allowing .

TỪ KHÓA LIÊN QUAN