DropDownList control

The DropDownList control allows users to select an item from a set of predefined items each item is a separate object with its own properties, such as Text, Value, and Selected. You can add these predefined items to a DropDownList control by using its Items property. Unlike the ListBox control, you can select only one item at a time, and the list of items remains hidden until a user clicks the drop-down button. You can add list items to the DropDownList control in the same way you add items to...

Using TopicID as selection criteria

There are a few differences between this page and the Topics page. This page uses the TopicID in the query to get only the threads associated with the topic the user requested Select ThreadID, Name from Threads amp _ _ I do this simply by concatenating the information from the QueryString into my Select statement. I could have, instead, used a parameter and filled in the parame ter with the TopicID. I decided not to in this case because it would have made the code more complicated and wouldn't...

Extensible Stylesheet Language Transformations XSLT

As discussed earlier, XML does not deal with the presentation of data contained within an XML document. It concentrates only on the structure and the data contained within the structure. This separation of the data and its presentation enables you to display the same data in various formats. However, because an XML document does not contain any formatting instructions for displaying data, you need some special tool that can convert an XML document into a user-viewable format. XSL T is a W3C...

Creating a deployment project

A deployment project enables you to specify the files to be included in the deployment and the name of the remote machine where the application or component needs to be deployed. You can create a deployment project by completing the following steps 1. Open the CalcNetAmt project. 2. Select File New Project. Select Setup and Deployment projects from the Project Types list box. 3. The Templates list box provides various options, such as Cab Project, Merge Module Project, Setup Project, Setup...

Data Types and Variables

Some fundamental logical features make up a programming language. The way data is handled and processed within the memory of the computer is accomplished through entities known as variables. Variables are defined in a way that describes the data that is contained within them, both in name and in content. For example, if you are trying to decide whether something is on or off or true or false, then you use the Boolean variable data type to house the information and may call it lCompleted. If you...

rat if vv rmrtM rti in

4 lt M Jl u Wr gt Jl J iMJ frn IIQ.-.IITr J-W t 3 LrWi Figure 9-5 Output of the application implementing data binding to a method The DataView class represents a custom view of a data table. This class is a member of the System.Data namespace, and to use this class in your page, you need to import the System.Data namespace. Before you can implement binding to a data table, add a new Web Forms page to your ASP.NET Web Application project. In this form, add a DataGrid control. Then, to implement...

Using the CustomValidator Control

Use the CustomValidator control to perform user-defined custom validation. This control allows custom code to perform validation on the client and or server. Table 6-5 lists the properties commonly used with the CustomValidator control. Use the CustomValidator control to perform user-defined custom validation. This control allows custom code to perform validation on the client and or server. Table 6-5 lists the properties commonly used with the CustomValidator control. Table 6-5 Properties of...

Adding and removing a file type

To add a file type to the deployment project, follow these steps 1. Open the File Type Editor in the deployment project by clicking the File Types Editor button in Solution Explorer, as shown in Figure 21-7. Figure 21-7 File Types Editor button in Solution Explorer 2. In the File Types Editor, select the File Types On Target Machine node. 3. Select Action Add File Type. This will add the file type to the File Types On Target Machine node. You can change the name of the newly added file type by...

kll J Vfr V I JHl fcr [

J i J hr gt ,jW gt r -J llv fttfrf I2WSW Swr Mpi littlii Figure 9-4 Output of the application implementing data binding to an ArrayList Binding methods is similar to binding any other expression. In this section, you'll create a method to return a string based on the value selected from the DropDownList control with ID CustState. Then, you'll bind the Text property of the Display Label to this method. To implement this binding, write the following code in the lt Script gt tag to create a...

Using ADO Extensions ADOX

Data is stored and maintained in different data sources. Some data source applications include MS-Access, SQL Server, Oracle, and Sybase. Each data source uses its own native syntax. Therefore, when you need to manage data stored in data sources from your applications, you would prefer to use standard objects and syntaxes irrespective of the data sources. It is inconvenient to use different objects, methods, and syntaxes to manage different data sources. ADOX provides a set of standard objects...

Standard ADOX objects

ADOX objects are a set of standard objects that are used to create and manipulate data stored in different data sources irrespective of their native syntaxes. Table 12-4 describes the ADOX objects. describe the schema catalog of a data source. Represents a table stored in a database. This object includes columns, indexes, and keys. Represents a column that might be from a table, index, or key. Represents a key field primary, foreign, or unique. Represents a view, which is a set of filtered...

Using ADOX objects

You can use ADOX objects in your Web applications to manage data stored in different data sources. However, before you can use ADOX objects, you need to establish a reference to the ADOX type library. The name of the ADOX library is Msadox.dll. To establish a reference to this type library, select Add Reference from the Project menu. Then, you can specify the path for the library. Note ADOX requires an interop assembly. When you add reference for the ADOX library, a dialog box appears asking...

Explicit namespace declaration

Explicit declaration defines a shorthand reference to an existing namespace. This method is used when referencing an element or attribute from other namespaces. For example, you could combine the elements from several namespaces into another XML document by using explicit namespace declaration as follows lt weather temperature lt liquid temperature 150 lt liquid temperature gt The name preceding the colon is called the prefix and serves as a shorthand notation so that references to the actual...

Custom HTTP Handler Example

Let us now create a simple HTTP handler that displays a hello message to the user and accesses the request and response information when an HTTP request is made for a Web page. To implement this example, create a Web application project. In this case, the project is a Visual Basic project named SampleHTTPHandler. Then, add a class to the project. To do so, select Project Add Class. This displays the Add New Item dialog box. In this dialog box, specify an appropriate name for the class. In this...

flTK

n.T rt gt ML. fk- MH. S WT-J, Figure A-6 The new form definition window Be sure to leave the .vb extension on the forms that you create. This is a feature of VB.NET that helps the IDE and compiler to know what parts of the solution are for a particular purpose. If you change a form's name, the form may become useless to you, because .NET will not necessarily know what to do with it. Click the OK button, and the new design surface of the window will be shown as having focus in the design area of...

Internal publication tools

Before we wrap up our discussion of Web service deployment and publication which has focused on making your Web services visible to the outside world , let's spend a few moments to discuss using these tools for internal intranet publication. If you are a developer in a small to medium-sized business that has a relatively small network with few developers and Web servers, you may find that discovery through DISCO is a sufficient mechanism for publishing your Web services on an intranet. Larger...