08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 5 ■ <strong>ASP</strong>.<strong>NET</strong> WEB SERVICES 113<br />

Adding Data to a <strong>Web</strong> Service<br />

To add a (strongly) typed DataSet to your web service, you use the Solution Explorer.<br />

Right-click your project <strong>and</strong> select Add New Item. The Add New Item dialog box displays<br />

(see Figure 5-5).<br />

Figure 5-5. Adding a typed DataSet to your project<br />

Select the DataSet <strong>and</strong> give it a friendly name. To use the code later in this section, for<br />

the purposes of this example, you should call it AddressData. The IDE will warn you that<br />

the code should be placed in the App_Code folder. Click Yes, <strong>and</strong> the TableAdapter Configuration<br />

wizard will launch. The first page of the wizard configures the desired database<br />

connection (see Figure 5-6).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!