techprofile
techprofile

Reputation: 19

How to add a ListViewItem in ListView control in asp.net code behind

I have declared a listView control on an aspx page.

e.g. <asp:Listview ID="ListView1" runat="server"><ItemTemplate></ItemTemplate></asp:Listview>

I want to know that how i can add one or more ListViewItems in code behind.

***Please don't give a solution that uses DataSource and DataBind methods for the ListView.

Thanks

Upvotes: 0

Views: 2874

Answers (1)

sudhansu63
sudhansu63

Reputation: 6180

No other way of binding data to ListView except DataSourceId and SataSource Check the ListView control Reference from MSDN Here.

Upvotes: 1

Related Questions