asp.net - Lost listview datasource when button clicked -
i have radlistview. add datasource listview when page_load. when clicked button in same page. lost datasource of listview. why? how can fix it?
try putting listview databinding code inside this.
protected void page_load(object sender, eventargs e) { if(!ispostback) { mylistview.datasource = mydatasource; mylistview.databind(); } }
you may want consider using updatepanels if wanting postback part of page, rather whole page.
Comments
Post a Comment