List view Item data insert to a List<> in c# asp.net

mika7410

New Member
My list view ItemTemplate is as follows\[code\]<a href='http://stackoverflow.com/questions/12614582/<%# getpath(Eval("IMAGE_PATH")) %>' title='<%# Eval("IMAGE_DESCRIPTION") %>'> <asp:Image ID="capty" CssClass="capty" runat="server" AlternateText='<%# Eval("IMAGE_DESCRIPTION") %>' ImageUrl='<%# retriveurl(Eval("IMAGE_PATH")) %>' Height="100px" Width="150px"> </asp:Image></a>\[/code\]my codebehind source is\[code\]int count=ListView1.Items.Count; List<ImageGallery> _list = new List<ImageGallery>(); for (int i = 0; i < count; i++) { ImageGallery ob = new ImageGallery(); ob.ImageName = ?? ob.Description = ?? _list.Add(ob); }\[/code\]now i want to insert the Eval("IMAGE_DESCRIPTION") data to a ob.Description and ob.ImageName=Eval("IMAGE_ID") .How to do this?\[code\]List<ImageGallery> _list = new List<ImageGallery>(); for (int i = 0; i < ListView1.Items.Count; i++) { ImageGallery ob = new ImageGallery(); ob.ImageName = ""; ob.Description = " "; _list.Add(ob); }\[/code\]
 
Back
Top