Ii
Figure 9-7 The Paging section of the Visual Studio .NET Property Builder dialog box The final GridText.aspx file is shown in Listing 9-1. Listing 9-1 GridTest.aspx, the source file describing the data grid shown in Figure 9-6 lt Page Language vb AutoEventWireup false Codebehind GridTest.aspx.vb Inherits Chapter0 9_Grid.WebForm1 gt lt DOCTYPE HTML PUBLIC - W3C DTD HTML 4.0 Transitional EN gt lt HTML gt lt meta content Microsoft Visual Studio.NET 7.0 name GENERATOR gt lt meta content Visual Basic...
The httpHandlers Section
The httpHandlers section maps incoming requests to the appropriate IHttpHandler or IHttpHandlerFactory class, according to the URL and the HTTP verb requested. Note When I talk about HTTP verbs, I mean the keywords used to specify what action the Web server should take. If you're an HTML developer, the most common HTTP verbs will be POST and GET. When you create an HTML form, you have these two options for the METHOD attribute of the lt FORM gt tag. When GET is specified, any form values are...
SqlClient vs OleDb Classes
The examples at the beginning of this chapter used a set of classes in the OleDb namespace to access data, and the stored procedure examples used classes in the SqlClient namespace. What's the difference Plenty. The OleDb classes are the more generic of the classes. You can hit any OLE DB data source, including Microsoft SQL Server, using these classes. They offer acceptable performance. It's difficult to split out database-only performance from the overall performance gains in ASP.NET over...
Repeater Control Basics
The Repeater control acts in many ways like the DataGrid control, but it gives you greater flexibility at the individual column level. There are no restrictions on how many or how few columns you display, and technically, you don't have to use a tabular view at all. The information displayed for each record bound to the Repeater control could be presented without any formatting or could be formatted using only lt BR gt and lt P gt tags. Most examples of the Repeater control, including the...
Info Pvx
Can't be overloaded, but are evaluated using the amp and operators, which can be overloaded. Can't be overloaded, but the same effect can be obtained using indexers. This operator can be used, for example, to create a virtual array. Can't be overloaded, but the same effect can be obtained using conversion operators implicit and explicit . Can't be overloaded, although they are evaluated so that, for example, uses the operator. , comma , , , - gt , new, is, sizeof, typeof There's a television...
Using WebMethod Attribute Properties
The WebMethod attribute accepts six properties to control how the XML Web service operates. These properties are described in Table 10-1. Table 10-1 Properties of the WebMethod Attribute Enables buffering of responses from the XML Web service. The default value is true, and this is almost always the best setting. If set to false, the response from the XML Web service will be sent to the requesting client in 16-KB blocks. The syntax for setting this parameter is shown here Visual Basic.NET C...
Using the IEnumerator Interface
As we examine the support within the .NET Framework for various types of data handling, it's important to understand some of the details of implementation. As you'll see, using the .NET Framework, you'll be able to use a great variety of objects to access data. All of this access, whether the underlying data is in an array, in a SQL Server database, or in an XML document, will have one thing in common it will take place through the IEnumerator interface. Recall that interfaces are the...
How ASPNET Uses ClientSide Scripting
One common control used on many forms is a drop-down list with several options. Based on the user's selection in the drop-down list, options in the form are customized to reflect the current selection. Selecting an item in a drop-down list doesn't cause a round-trip to the server, but client-side scripting can be used to cause a round-trip to the server. Listing 7-1 shows PostTest.aspx, an .aspx file created in Visual Studio .NET. Listing 7-1 PostTest.aspx, a page that generates a postback when...
Info Gzg
Figure 6-3 The page created by running UseLogin.aspx as shown in Listing 6-3 The user control appears to integrate seamlessly within the page. The login section can be included in many pages. Although this was possible using server-side include files in ASP, user controls offer the advantage of compiled code. Listing 6-4 shows the HTML sent to the browser when UserLogin.aspx is requested. Listing 6-4 The HTML sent to the browser when UseLogin.aspx as shown in Listing 6-3 is requested lt title...
Chapter 1 Introduction to ASPNET Development
Although this book is about ASP.NET, you can't fully appreciate this new technology unless you understand how Web development has evolved over the last few years. In this first chapter, I'll provide you with a brief history of the various ways in which Web applications have traditionally been developed. I'll start with HTML and then go quickly through the Common Gateway Interface CGI , the Internet Server Application Programming Interface ISAPI , and Active Server Pages ASP . Although these...

