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 12 ■ <strong>AJAX</strong> EXTENSIONS FOR <strong>ASP</strong>.<strong>NET</strong> 295<br />

Figure 12-13. Setting up the SQL query<br />

When you click Next, you’ll be taken to the Define Parameters step (see Figure 12-14).<br />

Here you can set up default parameter values that will be used in your SQL query. Select<br />

QueryString as the parameter source, <strong>and</strong> the wizard will set up the code required to read<br />

the parameter from the URI that you use to call the service. Give the query string field a<br />

name (i.e., ZIP) <strong>and</strong> a default value. Now if you call your service using a URI like http://<br />

server/pagename.aspxZIP=12345, the @PostalCode parameter will be loaded with 12345<br />

prior to calling the database.

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

Saved successfully!

Ooh no, something went wrong!