Using Data Templates
Often the data returned from a web service is an array of similar items. This is especially true when dealing with tables. In this section, we will create a web service that generates the content for the table in the ListEvents.aspx
page, obtain the data using Ajax, and then use a jQuery extension created by Microsoft to integrate the data into the page.
Creating the Web Service
We can extend our existing web service to support the ListEvents.aspx
page by adding another method to the service code-behind class and decorating it with the same attributes we used in the previous example. Listing 11-7 shows these additions; I have removed the bodies from the existing method and result type for brevity.
Listing 11-7. Adding a ...
Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.