TreeView control, callbacks and client-side events

A

alrotem

Hi,

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.

The problem:
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.

Note:
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.

Thank you!
Alon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top