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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

124<br />

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

Figure 5-16. Binding the ObjectDataSource to the web method<br />

The next step is to bind the input parameters to the data source. This means that<br />

you can codelessly accept input parameters via a text box <strong>and</strong> use them in the call to the<br />

web method. Earlier you added a text box <strong>and</strong> a button control to the page, <strong>and</strong> these<br />

will be used. Clicking the button triggers the form action, <strong>and</strong> this contains data from the<br />

text box. As a result, you should specify Form as the parameter source, <strong>and</strong> the text box<br />

as the form field that contains the parameter data. The default text box name is TextBox1,<br />

so if you didn’t change the name of the text box, you would use this name, as shown in<br />

Figure 5-17.

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

Saved successfully!

Ooh no, something went wrong!