You are here:   Blogs
Register   |  Login

Search

Minimize

PPG&A Blogs

Minimize
Dec 16

Written by: Phil Porter
12/16/2009 9:27 AM 

While using the quick add links in a generated Iron Speed application the quick add page can leave an entry in the session navigation history.  After saving the parent record this can have the undesired effect of returning the user to the quick add page rather than the show table page they were expecting.  A simple solution that I use is to override UpdateSessionNavigationHistory on the page.  Then add a conditional check for Target in the page request.  If Traget exist then don’t call the base otherwise business as normal.  

I’ve also introduced another check for my own purposes where hidemaster exist in the page request.

This way the user can use the quick add links without the confussion of being redirected to a page they aren’t expecting.

C# Code

protected override void UpdateSessionNavigationHistory()
{
  // do not update session navigation history
  if (this.Page.Request["hidemaster"] == null && this.Page.Request["Target"] == null)
  {
    base.UpdateSessionNavigationHistory();
  }
}



VB Code

Protected Overloads Overrides Sub UpdateSessionNavigationHistory()
    ' do not update session navigation history
    If Me.Page.Request("hidemaster") = Nothing AndAlso Me.Page.Request("Target") = Nothing Then
        MyBase.UpdateSessionNavigationHistory()
    End If
End Sub



Phil

 

Tags:

Archive

Minimize

WARRANTIES

Minimize

SOURCE CODE SAMPLES MAY BE INCLUDED IN SOME BLOGS. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Other marks and trade names used in this publication are the property of their respective owners.