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

A

artist

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top