Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
bowskill

Registered:
Posts: 60
Reply with quote  #1 
I also love the modal popup.

But after opening a modal window, clicking back on the browser takes me to the modal page again. How do I remove it from the browser history?

Thanks.
timt

Avatar / Picture

Iron Speed MVP
Registered:
Posts: 556
Reply with quote  #2 
Hi

There is a call you can make, something like removepagefromsessionhistory() that will remove it. Not able to locate the exact name at this time but you should be able to intellisense it

HTH

__________________
Tim Titchmarsh Iron Speed Consultant MVP
London UK based
+44 (0)1621 835002
http://www.lightspeeditsolutions.co.uk/dotnetarchitect
timt@dotnetarchitect.co.uk
timt@lsits.co.uk
pinbot

Avatar / Picture

MVP Consultant
Registered:
Posts: 967
Reply with quote  #3 
It used to be you could use the documentation tab, right click and insert an override to the "UpdateSessionNavigationHistory" method and then comment out the base call.

But in 11, they uncoupled the documentation tab from the page so this doesn't work.

The same documentation is in 11, but you need to manually put the code in.  You cannot just right-click on the function and say "Insert..."


8-22-2014 8-49-54 AM.jpg 




__________________
C. Bryan Patrick II
Iron Speed Designer MVP Consultant
Pseudo Consulting
porphi

Registered:
Posts: 648
Reply with quote  #4 
I think John is referring to browser history not session navigation history which are different.
__________________
Thank you,
Phil Porter
PPG&A, INC.
pporter@ppgainc.com
http://www.ppgainc.com
https://rapidsprout.com
678-362-2035
bowskill

Registered:
Posts: 60
Reply with quote  #5 
Actually pinbot is right - his solution works.

Add this code to the page class of the page that the modal popup is displaying:

Protected Overrides Sub UpdateSessionNavigationHistory()
    ' Do not do anything in this method to keep this page from being in the
    ' navigation history.  This is done for large list selector, date selector
    ' and other popup web pages.
End Sub

This stops it from appearing in the browser history. The browser back button then functions as expected after the modal popup has been used on the parent page.

Thank you all for your help and thank you pinbot for the solution.

Cheers,

John

porphi

Registered:
Posts: 648
Reply with quote  #6 
Odd, overriding update session navigation history so that it doesn't execute still shows the add page in the browser history for me.
__________________
Thank you,
Phil Porter
PPG&A, INC.
pporter@ppgainc.com
http://www.ppgainc.com
https://rapidsprout.com
678-362-2035
janthony

Registered:
Posts: 137
Reply with quote  #7 
Just an FYI, I have not worked with the pop ups yet in V11 so this may no longer be an issue. in past versions, in addition to the browser history, I had a problem with pop-ups being cached, and not reflecting the current data.

The solution I used, was to add two lines to the top of the LoadData method on the pop up page to keep the pop up pages from being cached, or appearing in the history. 

Code:

public void LoadData()

{

// LoadData reads database data and assigns it to UI controls.

// Customize by adding code before or after the call to LoadData_Base()

// or replace the call to LoadData_Base().

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetAllowResponseInBrowserHistory(false);

LoadData_Base();

}

 

Thanks,
Jim
paololabe

Registered:
Posts: 11
Reply with quote  #8 
I encontered the same problem for an applkication migrated from 10.x to 11.
Pop up and quick selector stay in hystory, while for an application created in 11 this doesn't happen.

I solved making this changes in BaseApplicationPage.cs:

 private void Page_Load(object sender, System.EventArgs e)
        {
            if (BaseClasses.Configuration.ApplicationSettings.Current.RestfulEnabled)
        {               
            MiscUtils.InitializeRestfulHostURL(this.Page.Request);            
            }

            if (this.MasterPageFile.ToLower().Contains("popup"))
            {
                this.RemoveCurrentRequestFromSessionNavigationHistory();
            }
        }

Hope this help.
Paolo.
staale

Registered:
Posts: 14
Reply with quote  #9 
But in 11, they uncoupled the documentation tab from the page so this doesn't work.

The same documentation is in 11, but you need to manually put the code in.  You cannot just right-click on the function and say "Insert..."

It was a shame that they removed this feature! Why? I think it was MUCH easier ....:-(
zeeman73

Registered:
Posts: 44
Reply with quote  #10 
having the same issue here
where do you add this code if it is redirecting on a button.
thanks
zee
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement