CollapsiblePanel: Page's scroll position reset to top at open event? (but no postback!)

Last post 04-03-2008 1:45 AM by Petrander. 4 replies.

Sort Posts:

  • CollapsiblePanel: Page's scroll position reset to top at open event? (but no postback!)

    04-02-2008, 7:45 AM
    • Member
      351 point Member
    • Petrander
    • Member since 10-31-2005, 11:13 AM
    • Copenhagen
    • Posts 122

    This is a mysterious problem. I have a page with collapsiblepanels inside a databound repeater, i.e. a lot of panels that can be opened and closed. This worked fine inside an iframe, but when I moved to using nested master pages instead of that, a mysterious issue emerged.

     Every time a collapsed panel is opened on the page, the scroll position is reset to the top of the page! But this is strange since we are not doing a postback. On the other hand. the whole thing is inside an updatepanel extending over the entire page. Could that be the cause?

     
    Thanks for any help...

     


     

  • Re: CollapsiblePanel: Page's scroll position reset to top at open event? (but no postback!)

    04-02-2008, 9:06 AM
    Answer

    I would think that something is causing a postback.  You could place a breakpoint on your Page_Load event and see if it's getting hit.

    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
  • Re: CollapsiblePanel: Page's scroll position reset to top at open event? (but no postback!)

    04-02-2008, 10:57 AM
    • Member
      351 point Member
    • Petrander
    • Member since 10-31-2005, 11:13 AM
    • Copenhagen
    • Posts 122

     Tried that, but there seems to be no postback. It appears to be happening client side, also because it is really fast compared to my actual postback events. There is no delay, so something is happening client side.

     On the same page I have (hidden in another TabContainer) a similar list that does not have the same problem!
     

  • Re: CollapsiblePanel: Page's scroll position reset to top at open event? (but no postback!)

    04-02-2008, 11:06 AM

    Can you post the (simplified) source code?

    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
  • Re: CollapsiblePanel: Page's scroll position reset to top at open event? (but no postback!)

    04-03-2008, 1:45 AM
    • Member
      351 point Member
    • Petrander
    • Member since 10-31-2005, 11:13 AM
    • Copenhagen
    • Posts 122

     Turns out you were right after all, there was a <a href="http://forums.asp.net/AddPost.aspx?ReplyToPostID=2271998&Quote=False#"> around the element inside the ExpandControl-panel, which is the cause. Removing it solved the issue.


Page 1 of 1 (5 items)