tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 106
Professional in C# and Visual Basic Part 106. 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 21 Security Attribute Description timeout Specifies the amount of time in minutes after which the cookie expires. The default value is 3 0. cookieless Specifies whether the forms-based authentication process should use cookies when working with the authentication authorization process. defaultUrl Specifies the default URL. domain Specifies the domain name to be sent with forms authentication cookies. slidingExpiration Specifies whether to apply a sliding expiration to the cookie. If set to True the expiration of the cookie is reset with each request made to the server. The default value is False. enableCross AppsRedirect Specifies whether to allow for cross-application redirection. requireSSL Specifies whether a Secure Sockets Layer SSL connection is required when transmitting authentication information. After the file is in place the next step is to create a typical page for your application that people can access. Listing 21-4 presents a simple page. Listing 21-4 A simple page @ Page Language VB html xmlns http 1999 xhtml head runat server title The Application title head body form id form1 runat server div Hello World div form body html As you can see this page simply writes Hello World to the browser. The real power of forms authentication is shown in the page presented in Listing 21-5. Listing 21-5 The page VB @ Page Language VB script runat server Protected Sub Button1_Click ByVal sender As Object _ ByVal e As 1008 Chapter 21 Security If BillEvjen And Bubbles Then True Else Invalid credentials End If End Sub script html xmlns http 1999 xhtml head runat server title Login Page title head body form id form1 runat server div Username br asp TextBox ID TextBox1 runat server asp TextBox br br Password br asp TextBox ID TextBox2 runat server TextMode Password asp TextBox br br
đang nạp các trang xem trước