browser history do not work properly

Last post 04-29-2008 9:11 AM by richamo. 3 replies.

Sort Posts:

  • browser history do not work properly

    04-01-2008, 10:11 AM
    • Loading...
    • hublubble
    • Joined on 04-01-2008, 1:54 PM
    • Posts 2

    Hi,

     I have an ajax enabled asp.net 2.0 page. There are some updatepanels on it and I use the history control to enable the browser history buttons. For first time the AddHistoryPoint method adds a history point to my history control. That works, I think. But on Navigate event, the args.State will contain no key! There is no entry in the dictionary! Therefore my navigation function breaks. Has anybody some similar effect? Or better a solution!

    Thnxs.

  • Re: browser history do not work properly

    04-02-2008, 6:39 AM

     instead of response.redirect some how try to use window.open.this will surely help u out.

    and for further reference u can go through post written by me.please try to search it.

     

    shikhar 

  • Re: browser history do not work properly

    04-02-2008, 12:53 PM
    • Loading...
    • hublubble
    • Joined on 04-01-2008, 1:54 PM
    • Posts 2

    Hi shikhar!

    you don't understand the major problem I think. I've said that my app is AJAX enabled (based on ASP.NET 2.0 version). Therefore I don't have any obviously redirects or so on. It's all nice asynchronous. Now the problem: I had a requirement to go back and forward in my app and I found the History control (from ASP.NET Futures July 2007 “Futures” release) which addressed the fact. I decided to use it and I implemented it in my app. First time click my button that change my MultiView controls ActiveViewIndex, in the eventhandler I set the HistoryPoint, the browser history has a new entry. Then I go back and set a breakpoint at Navigate eventhandler. But the State dictionary of the HistoryEventArgs is empty! It seems that AddHistoryPoint will not add anything to the dictionary!

  • Re: browser history do not work properly

    04-29-2008, 9:11 AM
    • Loading...
    • richamo
    • Joined on 01-18-2008, 6:20 AM
    • Posts 3

    Hello, 

     Are you using masterPages ? If yes, use a scriptmanagerproxy in content page.

    Are you using conditional updateMode for updatePanels ? If yes, set the scriptManager as a trigger of your updatePanel on Navigate event.

    If you are using both, then set the scriptManager as a trigger by code behind (you can also inherit the scriptmanager proxy and make your implementation implement the IPostBackEventHandler interface and then you can declaratively set the scriptmanagerProxy as a trigger of your updatePanels in content page).

    Bye, Hope this will help

     
    Morgan
     

Page 1 of 1 (4 items)