c# - Page lifecycle stops after command from ListView -


i have listview in web form (c#/.net 4.0). there imagebutton in itemtemplate.

after postback, itemcommand event fires... , everythings stops. no other page events occur. (actually there 1 other thing: dispose() extendercontrolbase runs right after event code finishes - site has ajaxcontroltoolkit controls, though there none on particular page).

there lot of things involved here it's not practical post code, generally, there cause this?

i rebinding listview on each postback, because i'm handling paging on server side. when assign data source listview, it's going have no rows. @ time command event fires, datasource has no data in it, since hasn't yet been loaded database , rebound. can't think why cause entire page stop loading, though.

the template this:

<itemtemplate>    <tr>      <td class="datalistrow"><asp:imagebutton id="edit" runat="server" imageurl="~/images/nav/datagrid_edit.gif" commandname="edit" />     </td> // few orther cells    </tr> </itemtemplate> 

thoughts?

doesn't sound right me.

in these situations, take approach this:

  • first, make sure page checked source control or otherwise backed up.
  • if possible, create new page , copy in controls , associated code blowing up. see if works in isolation. if doesn't work in isolation, well, you've isolated problem.
  • if can't due complexity, or if code works fine in isolation, go problem page , start ripping out other functionality. seriously. systematically remove controls , features on one, starting whatever complex.
  • eventually, after 1 of changes abberant behavior stop, , whatever removed last in way culprit. see if can fix together.
  • roll , apply fix.

this hasn't failed me yet.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -