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

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -