Using SOAP extensions

One of the more advanced features of SOAP within the .NET Framework is the SOAP extensions technology. Using this technology, you can inspect or modify a SOAP message at specific stages in message processing on either the client (consumer of the Web service) or server (the Web service itself). Of course, this assumes that the client and server are both based on .NET. SOAP extensions are a powerful feature, because they enable you to implement some very interesting applications that can be...

SOAP Data Type Support

The SOAP specification defines data type support in terms of XSD, the XML Schema specification. This specification defines standards for describing primitive data types as well as complex, hierarchical structures. As you would expect, there is support for integers, strings, floats, and many other primitive types, as well as lists (or arrays) of these primitive types. In addition to primitive types, user-defined structures can be represented. This is significant, because it paves the way for...

ASPNET authentication options

The security section of the Web.config file contains the information related to the level and type of authentication services that would be provided for a Web application. Th e Web.config file is an XML file and is located in the root directory of a Web application. Various configuration options for an ASP.NET Web application can be controlled and configured from this XML file. Cross- For more information on the security section of the Reference Web.config file, refer to Chapter 14. The...

Registry Editor

You may want to access the Registry and set values of existing Registry keys or add new Registry keys to the target computer. The Registry Editor enables you to add your own Registry keys and their values to a deployment project. When you execute the deployment project, the Registry keys are added to the Registry of the target computer. When you open the Registry Editor, it displays a standard set of keys, which correspond to the keys in the Windows Registry of the target computer. Figure 21 -4...

Check Box and Check BoxList controls

Check boxes provide you with independent choices or options that you can select. You can add check boxes to a Web Forms page by using either the CheckBox control or the CheckBoxList control. The CheckBox control is a single check box that you can work with. On the other hand, the CheckBoxList control is a collection of several check boxes. After you add the CheckBoxList control, you need to add a list of items to it. To do so 1. Display the Properties window of the CheckBoxList control. 2....

SOAP Exceptions

If Web service methods were guaranteed to work at all times, we would not need any form of error notification or processing capabilities. Unfortunately, things can (and often do) go wrong. As such, errors or exceptions that occur in a Web service method call need to be communicated back to the consumer of the Web service in some manner. This is where SOAP exceptions come into play. SOAP exceptions are used to return error or exception information to the consumer of a Web service as the result...

Controlling the appearance of the Grid Body

If you want to format the body of the grid so that your Web page has a specific look and feel, you need to set the properties of the asp DataGrid element. To change how the grid is displayed, take a look at the following code < html> < head> < title> Hungry Minds Chapter 9 < title> < script language C runat server> void Page_Load(Object sender, EventArgs e) String items Rick, Billy, Ed, Steve -- bind the data source simple.DataSource items simple.DataBind() < script> <...

Web Service Wire Formats

The final piece of the ASP.NET Web Services infrastructure consists of the Web service wire formats. Wire formats define the method by which Web service request and response messages are encoded and transported between the Web service and any consumer. To maximize the reach of Web services on the Internet, standard Internet protocols are used. ASP.NET Web Services support three wire formats HTTP-GET, HTTP-POST, and HTTP-SOAP. Traditional Web applications have used HTTP-GET and HTTP-POST to...

Working with Data Grids

The DataGrid control is a bound data control that displays items from the selected data source in a grid or spreadsheet-like fashion. This was possible before .NET, but it required a fair amount of code if you wanted to implement more than a read-only grid. This new server control, along with the Repeater and DataList controls, makes it a snap to wire up to a data source and display columnar data using a minimal amount of coding. New to the DataGrid control is paging. You no longer have to be...

Culturelnfo class

The CultureInfo class represents the information that is specific to the user language, country, region, and culture. The name of the culture follows the format. The languagecode2 represents a lowercase two-letter code for the language, whereas country regioncode2 represents an uppercase two-letter code for the country or region. For example, if the name of the language is English and the country region in which the language English is spoken is United States, the name of the culture is en-US....

About the Authors

Mridula Parihar has a master's degree in Applied Operations Research from Delhi University. She is a Microsoft Certified Solution Developer (MCSD) and has worked approximately 2 years with NIIT Ltd. Mridula spent her first year in the Career Education Group (CEG) of NIIT, in which she taught NIIT students and was involved in scheduling and managing resources. For the past 1 years, she has been working in the Knowledge Solutions Business (KSB) group of NIIT, in which she has had the opportunity...

Creating Templates

You can create templates by using the Web Forms Designer in a WYSIWYG (What You See Is What You Get) way or by using the ASP.NET syntax in the ASPX file. This section explores both of these methods. The method to create templates by using the Web Forms Designer is very convenient to use 1. Right-click the control and choose Edit Template from the shortcut menu. Then, choose the type of template to edit. For example, to edit Item templates, such as ItemTemplate, AlternatingltemTemplate,...

Creating a New Thread

One more page is needed to make this application complete a link from the Threads page that allows the user to create a new thread. This link sends them to the NewThread page. < Page Explicit True Language VB Debug True > < Import Namespace System.Data > < Import Namespace System.Data.OleDb > < Script Runat Server> Sub PostClick( obj As Object, e As EventArgs ) Dim Connection As OleDbConnection Dim ThreadCommand As OleDbCommand Dim GetThreadCommand As OleDbCommand Dim...

Combining templates with the Repeater control

The templates that the Repeater control supports include ItemTemplate, AlternatingItemTemplate, HeaderTemplate, FooterTemplate, and SeparatorTemplate. To render the Repeater control on a page, you must bind the control to a data source and create at least ItemTemplate. The controls within the templates can be bound to the container data. This section implements creating templates for the Repeater control. First, create an ASP.NET Web application project. You can create a Visual Basic or C...

Launch Conditions Editor

Your application may be dependent on several factors, such as availability of files, the version of the operating system on the target machine, and Registry keys. Therefore, you might want to ensure that the version of the operating system on the target computer is appropriate for running your application or search the target computer for the existence of a particular file or a key in the Registry. You can perform these tasks by using the Launch Conditions Editor. Figure 21-14 depicts the...

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...

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 Custom Validator 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...

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...

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...