The ListView Control

Please install Silverlight or click download to watch video locally.

By creating a new website, I will demonstrate the new ListView control. Because the ListView is data drive, we will need a data source. You can use any data source: SQL, object data, link data or XAML. I will use my blog as the data source in this video.

Presented by Joe Stagner

Duration: 10 minutes, 40 seconds

Date: 15 November 2007

Watch    Video   |   Download    Video   |   VB Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 41

Leave a Comment

atarikg : On April 08, 2008 6:23 PM said:

awesome ! Thanks for that video...

JoeStagner : On April 14, 2008 9:08 PM said:

You're very welcome !!

jburnish : On May 13, 2008 9:21 AM said:

Nice work.  Now if I can just find a decent XML/XAML/XSLT class, well, anywhere, that would rock.

farisca : On May 18, 2008 2:31 PM said:

ThankYou So much for the Video..

It Helped me a lot for my studies.....

jrc4ksu2 : On May 24, 2008 2:16 PM said:

Your code works but has these two errors:

Message 1 Validation (ASP.Net): Attribute 'ItemContainerId' is not a valid attribute of element 'ListView'. F:\Windows\jrcBhere\My Documents\Visual Studio 2008\WebSites\Learn\2-Listview\Default.aspx 14 23 F:\...\2-Listview\

Error 2 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. F:\Windows\jrcBhere\My Documents\Visual Studio 2008\WebSites\Learn\2-Listview\hdi-vs08-listview-code\web.c onfig 78

If "ItemContainerId" is not valid what is correct?

ramesh5782 : On June 11, 2008 5:45 PM said:

It's very good video. Thanks alot....

vik20000in : On July 04, 2008 3:22 AM said:

very good video.

joshypala : On July 07, 2008 6:07 PM said:

It's very good video. Thanks alot....

pakiduke : On July 07, 2008 10:52 PM said:

Great video. I learnt a lot about nested master pages from this. Thanks.

http://aspnet.eforica.com

vykunta : On July 19, 2008 3:07 AM said:

it's a good video. it simplifies the work. thank u very much.

wlussi : On August 09, 2008 4:55 AM said:

Hi Joe,

good video - but no C# code.

cv_vikram : On August 11, 2008 5:41 PM said:

thanks.....

munishbhatia : On August 13, 2008 2:28 PM said:

Good presentation

mumphis : On August 17, 2008 8:06 AM said:

a very neat feature.  When creating the video, you should have some of these code blocks available for cut and paste from another source.  This way you would have more time for explanations instead of having us watch you type.

Very good though, you demo is appreciated.

muhammed : On August 18, 2008 2:30 AM said:

good video Joe thanks

jlpa : On August 25, 2008 10:56 AM said:

Hi,

Can any help me?

I want to bind a List<staff> to a listview or gridview (staff is a custom class).

I have done this with dropdownlist but with gridview it is not working.

Below is the code behind

DropDownListDirector.DataSource = departmentManager.GetAllDirectors(); //returns a generic list of objects staff

           DropDownListDirector.DataTextField = "name";

           DropDownListDirector.DataValueField = "id";

           DropDownListDirector.DataBind();

aspx code:

This is working.

What i am asking is : is it possible to do this with gridview or listview? How?

Thanks

sudeepunnikrishnan : On August 29, 2008 5:28 PM said:

pretty neat, thanks

Shripad.Baride : On September 20, 2008 12:16 AM said:

Very good video! Features of listview explained very nicely.

kaushalparik27 : On September 24, 2008 4:49 AM said:

thanx for the video.. nice and neat

adeel akberani : On September 24, 2008 9:27 PM said:

thanks for coopperete

adofu2008 : On October 30, 2008 2:23 AM said:

It's so good!

djibril_chimere_DIAW : On October 31, 2008 4:04 AM said:

Thanks! Jërëjëf!

rami_nassar : On December 01, 2008 2:09 AM said:

you always JoeStagner be the best :)

rasikraj : On January 06, 2009 4:36 AM said:

This is very Good!!

rsgill76 : On January 06, 2009 2:21 PM said:

Hello, Your videos are extremely helpful.

I am having an issue with adding a ListView to a user control.

The ListView will be populated with XML data consumed from a web service.  Initially, the ListView's DataSourceID is set to an XmlDataSource.  The code-behind is where I'm setting the XmlDataSource.Data to equal an XML string.

When the control is loaded, the ListView contains 1 empty ItemTemplate and then an XML populated ItemTemplate.  Everything seems to work fine accept for the first ItemTemplate that is rendered empty.  I've searched and searched for an explanation but can't find any.

I will greatly appreciate any ideas you may have.

Anup Kadam : On January 27, 2009 5:47 AM said:

Awsome thanks for the video...

RaeKC : On February 13, 2009 10:47 PM said:

How do you fill a listview control with a searched item? For example if you have a text box, and user types in a search term. Then how do you fill listview with only results of that search?

ChosenBreed : On February 24, 2009 8:08 AM said:

Hi Joe! Great video, nice simple clear. Easy to follow along. What's really compelling about the ListView in comparison to the Repeater or DataList from previous versions? Why do we need a place holder with a specific ID ('itemPlaceholder')? Sounds bizzare!

brac10 : On March 21, 2009 4:33 PM said:

Rock on Joe...Good Stuff

naveenmishra : On March 22, 2009 10:11 AM said:

this is excellent work done by microsoft.

thanks a loot

i was working on vfp it is old technology. i was planning that i have to join a institute but i thing it is possible me to learn every thing through this video. if i able to dounload all video. i am getting some error to dounload lession 5 & 6.

thanks again

naveen kumar mishra

new delhi

9871115570

mcp111 : On March 28, 2009 2:58 AM said:

How do you know the values of XPath to put in eg. XPath("link"), etc? Is this standard for RSS? I tried the same example code using my blog RSS and it worked great!

sujan_b : On April 04, 2009 3:31 AM said:

Hi

This post could be out of place but I cannot seem to download the vids . Any suggestions ?

Thanks

Henx : On April 07, 2009 11:16 PM said:

This was a sweet vid.

Thanks alot

haithemara : On May 19, 2009 3:15 AM said:

Excellent video Joe. Thank you

angela_china : On May 29, 2009 3:00 AM said:

yes, i need it

vaibhavdwivedi86 : On June 26, 2009 11:15 AM said:

Thanks buddy for your knowledge

didi32 : On July 24, 2009 7:27 PM said:

I tried to build and run this demo, but got the error "Expected DTD markup was not found. Line 1, position 3.". The web site builds without errors, but I get this server error at run-time. I am not sure what the problem might be.

sbmdude : On August 23, 2009 2:08 AM said:

Hi got the same error when ran the program. I didn't understand whats the problem is .. Below is the Error, Please could any one help me in Fixing it...??

ERROR:

Expected DTD markup was not found. Line 1, position 3.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: Expected DTD markup was not found. Line 1, position 3.

bkraider : On August 27, 2009 1:30 AM said:

its a pretty cool video but I am getting the following error

System.Xml.XmlException: Expected DTD markup was not found. Line 1, position 3.

Any idea how to resolve it?

bkraider : On August 27, 2009 5:54 AM said:

this is the new xml datasource the above mentioned error will disappear

DataFile="http://misfitgeek.com/blog/feed/" XPath="/rss/channel/item"/>

</asp:XmlDataSource>

vnis : On November 02, 2009 5:51 AM said:

THANK..

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities