locked
Page redirection in ASP.NET MVC RRS feed

  • Question

  • Hi!

    First of all, I did not find a suitable category to post this in. Please help me to find one :D

    The question:

    Consider the following scenario.

    You have a Edit action (GET and POST) for an entity that multiple pages link into (GET EDIT). What is the best way of getting back to the page that linked to the edit action? Adding a postback url in the query?

    Example, from MyCart/3 we have a edit product link
    /Product/Edit/5?postbackTo=MyCart/3   (but url encoded)

    And from Producer/45 we have this link
    /Product/Edit/5?postbackTo=Producer/45

    Is there a better way to do this?

    Thanks
    // Johan
    JohanK
    Tuesday, January 5, 2010 5:08 PM

All replies