tags:

views:

112

answers:

1

I'm using the excellent Magellan navigation framework from Paul Stovell.

When you have this method in the controller

Public Function Save(ByVal Contact As Contact) As ActionResult
    Try
        Contact.Save()
        Return Index() ''//Call other action result that brings the list of contacts
    Catch ex As Exception
        Return New CancelResult
    End Try
End Function
  1. Is there a way that Index does not create another view, but navigate to the existing one (if exists)?
  2. Is there a way to destroy a View (in this case, the contact view, which is not longer valid because the record is already saved in the DB)
+2  A: 

You may be able to accomplish this using the Action and Result Filters feature:

http://www.paulstovell.com/magellan-action-and-view-filters

You could use OnResultExecuted to track the page that was rendered. Then you could handle OnResultExecuting to see the target page - if it's a page that exists in the navigation journal, you could issue GoBack/GoForward commands to navigate back to the page.

Paul Stovell