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 123<br />

If you select the Configure Data Source link, you will be taken into the wizard that<br />

allows you to configure the data source for the ObjectDataSource control. As this project<br />

is using a table adapter for the address database, you’ll see this as an option in your business<br />

objects. However, you won’t see the web service unless you uncheck the “Show only<br />

data components” check box. Once you’ve done this, you can select your web service<br />

(i.e., AddressData.Service). See Figure 5-15.<br />

Figure 5-15. Configuring the business object for your ObjectDataSource control<br />

The next step is to select the data method that this ObjectDataSource control is going<br />

to use. You can select, update, insert, or delete using this control, but in your case you’re<br />

reading the response from a web service, so you use the Select tab <strong>and</strong> choose the<br />

GetAddress web method that was created earlier. You can see this in Figure 5-16.

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

Saved successfully!

Ooh no, something went wrong!