Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   How can I bind the results of Web service to a ListView? (http://www.velocityreviews.com/forums/t728062-how-can-i-bind-the-results-of-web-service-to-a-listview.html)

artist 07-12-2010 09:25 PM

How can I bind the results of Web service to a ListView?
 
Hi all,

I'm new to ASP.NET so I apologize if this is a basic question.

I have a Web application. This web application has a ListView on it.
For this web app I make calls to a web service which returns data from a
database. I return the data using the following format:


[WebMethod]
public List<Record> Search()
{
List<Record> list = new List<Record>();
/* Populate list with data from a db */
return list;
}

public class Record
{
public String name;
public String address;
public int ageInYears;
}

Now I would like from the Web Application to show the data on a
listview. Is there a way of doing this by using the Data Source property
of the Listview or the only way is to populate the listview manually?

Thanks a lot


All times are GMT. The time now is 10:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57