Configuring an Application
One element seems to be missing from the Visual Basic .NET code shown in Listing 4-3. Although I've often extolled the virtue of using Option Explicit, I didn't use it in this example, which can be done by setting Explicit true in Page. I can assure you that the page does require variables to be declared I missed one of the references to loop when converting the application from C to Visual Basic .NET and an error page did in fact appear, as shown in Figure 4-13. J J 2 T----- Jmtfi J-H n. J i...
A Visual Basic NET Example
The same page created using Visual Basic .NET is shown in Listing 4-3. This listing isn't much different from the C example presented in Listing 4-2. Listing 4-3 SayHelloASPDOTNETVB.aspx sample application listinc lt Page Language VB gt lt HTML gt lt HEAD gt lt TITLE gt My First ASPX Page lt TITLE gt lt HEAD gt lt BODY gt Dim tLoop as Integer Dim s as String s lt FONT SIZE 0 gt Hello ASP.NET World lt FONT gt lt BR gt , tLoop lt SPAN id Message runat server gt Figure 4-1 shows the output from...
The sessionState Section
Session state support in ASP.NET is much more extensive and flexible than it was in ASP. For developers of small Internet or intranet Web sites, the session support offered by ASP was adequate. The problem was that ASP session state didn't scale out to multiple Web servers. ASP session state was stored on the Web server, and so using a system like Microsoft's Network Load Balancing provided no assurance that the same server in a Web server farm would service each request from a particular...
A Better Solution Active Server Pages
If you're wondering why we've dwelt on the alternatives to ASP.NET in a book about programming ASP.NET, the answer lies in the details of the implementation of ASP.NET and its predecessor, Active Server Pages ASP . Understanding ISAPI is required for a deeper understanding of ASP and thus ASP.NET. During the beta of IIS 2.0, which became part of Windows NT 4.0, Microsoft introduced a new technology initially codenamed Denali. This was during Microsoft's Active period, and so the technology was...
The CompareValidator Control
Referring back to Login.aspx, in Listing 5-1, you'll see that logic is used to compare the e-mail address and password entered to hard-coded values. If the e-mail and password don't match what's expected, another label on the form will be set to a message requesting the user to try again. We haven't seen that message yet, because when we clicked the Login button, the client-side validators fired and displayed those red asterisks before the form was submitted. Because the client-side validators...



