TreeView control, callbacks and client-side events

Discussion in 'ASP .Net' started by alrotem, Jan 14, 2007.

  1. alrotem

    alrotem Guest

    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.
     
    alrotem, Jan 14, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mong
    Replies:
    5
    Views:
    4,726
    Kevin Spencer
    May 7, 2004
  2. Lucas Tam

    Client Side Callbacks for ASP.NET 1.x

    Lucas Tam, Feb 1, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    1,329
    Jeff @ Dart
    Feb 7, 2005
  3. =?Utf-8?B?TmV2ZXJseW4=?=

    Problem using Client Side Callbacks in 2.0

    =?Utf-8?B?TmV2ZXJseW4=?=, May 8, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    366
    =?Utf-8?B?TmV2ZXJseW4=?=
    May 8, 2005
  4. Stuart Whiteford
    Replies:
    2
    Views:
    745
    Stuart Whiteford
    Apr 25, 2006
  5. Sohail

    treeview new client side events

    Sohail, Nov 7, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    130
Loading...

Share This Page