Event Support Provided by Aspnet Html Server Controls

Events are raised and handled on the client by the Event object in traditional Web applications. Because of the separation of the event from its handler, the way events are raised by ASP.NET server controls is different The events associated with server controls are raised on the client, but the ASP.NET page framework handles them on the server. During server page processing, change events are processed first, without regard for order. When the processing for the change events has occurred, the...

Example Multiplication Application

We've spent quite a bit of time discussing Web forms. At this point, let's create a form that allows the user to enter two numbers, click a button, and see the result of multiplying the numbers. With a few simple steps, we'll create a very simple application. No big deal, right That's exactly the point. If there's one thing you'll hear over and over regarding .NET, it is that .NET does for Web development what Visual Basic did for Windows development. Just as Visual Basic did a good job of...

Building a Simple Control

Now let's build a simple Web form user control that we can call from an .aspx file. The following steps will walk you through creating a Web user control and displaying it in a Web form. Before we begin, make sure you create, or already have at hand, a virtual directory in which to store your test code. 1. Open up the VisualStudio.NET IDE, and click on File, New, Project. You should now see the New Project dialog box as shown in Figure 6.3. Figure 6.3 The New Project dialog box. Figure 6.3 The...

Changes in Using Parentheses

There are a number of places in VB6 where parentheses are optional, or even not allowed, that require parentheses in Visual Basic .NET. For example, if a subroutine is called without the Call keyword in front of it in VB6, parentheses are not used around the argument list for the subroutine. However, all subroutine calls in Visual Basic .NET require parentheses around the argument lists. Similarly, some built-in functions in VB6, such as the Date function, did not take any parentheses. But in...