Step 2 of 3: Adding a Web Service

In this step you'll add a data source to your project, and begin the process of binding the grid.

To set up your project, complete the following steps:

1.   Navigate to the Solution Explorer, right-click the StealthPaging.Web project, and select Add Reference from the context menu.

2.   In the Add Reference dialog box locate the System.Runtime.Serialization assembly and click the OK button to add a reference to your project. The dialog box will close and the reference will be added.

3.   In the Solution Explorer right-click the StealthPaging.Web project, and select Add | New Item.

4.   In the left pane of the Add New Item dialog box, select the Web item.

5.   In the templates list, select Web Service, name the Web Service "DataWebService.asmx", and click the Add button. Note that the Web Service file will be added to your project and automatically opened.

6.   In the DataWebService.asmx file, add the following using statements at the top of the file:

      Visual Basic

      C#

7.   In the DataWebService.asmx file, replace the code in the StealthPaging.Web namespace with the following::

      Visual Basic

      C#

This code will create a new list that will be used to populate the C1DataGrid control.

8.   Save your application, right-click the StealthPaging.Web project, and select Build from the context menu. Note that you'll now be done with the StealthPaging.Web project and will return to working with the StealthPaging project.

 What You've Accomplished

In this step you've added a data source to your project and created a Web Service. In the next step you'll finish connecting the Web Service to your project and you'll run your application.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.