PC Review


Reply
Thread Tools Rate Thread

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

 
 
artist
Guest
Posts: n/a
 
      12th Jul 2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ListView Bind shapper Microsoft ASP .NET 0 18th Nov 2007 12:47 AM
How to bind ListView to Dataset IfThenElse Microsoft C# .NET 4 29th Oct 2007 12:28 AM
Re: How to bind ListView to Dataset Nicholas Paldino [.NET/C# MVP] Microsoft C# .NET 0 26th Oct 2007 04:37 PM
How to bind listview? =?Utf-8?B?Rko=?= Microsoft Dot NET Compact Framework 4 18th Apr 2004 09:21 AM
How to Bind DataTable to ListView? news@mikendy.com Microsoft Dot NET Compact Framework 3 29th Aug 2003 01:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 PM.