TreeView control, callbacks and client-side events
I'm using an <asp:TreeView> control on my page.
Combining the TreeView's OnTreeNodePopulate server-side event handler,
and the PopulateOnDemand set to "true" on each node, I get client-based
functionality, with callbacks. I can clearly see that the page does not
refresh, which is good, as this was my intention to begin with.
I also closely inspected the client-side sources (using "Instant
Source") and saw that on every click on the "+" (expand) icon, I get a
real callback invocation, using XMLHTTP. So far so good.
Whenever I click the "+" icon, and the callback is invoked, my page's
onbeforeunload() client-side event is triggered.
I don't know what's causing the page to "unload". Apart from the
TreeView control the page has nothing else on it. There's no explicit
"navigate" or "submit" on the page, so this "unloading" is performed
implicitely but I don't know what's triggering it. I need to stop the
page from "unloading" whenever I try to expand a node, but still
maitain my callback functionality.
When I click the "+", I access my breakpoint in the Page_Load()
function and IsPostBack is set to "true", but the page does not
actually refresh on the client-side.
Why does it implicitly post back?
How can I prevent my tree from posting back?
How can it be that page posts back on the server side, but the client
side remains steady?
Help will be highly appreciated.
|All times are GMT. The time now is 12:02 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.