Not strictly a NT query but I'm trying to use the FormUtil class to help with the navigation between pages.
In the NT NorthWind sample there is a Customer list (default.aspx) which allows you to "select" a customer for editing. this takes you to the Customer Edit page (CustomerEdit.aspx) and edits can be performed as required. This works fine, but when you exit the edit page the customer list page always returns to the first page as it has lost its pageindex.
In other NT and a lot of other general ASP.NET examples the FormView is always on the same page as the GridView and so maintaining the pageindex isn't a problem. However this isn't possible in our system as we need to reuse edit pages and I could see the list page becoming unwieldy.
My current solution is to pass the current GridView pageindex to the Edit page as a querystring param. This is then passed back again from the FormView page when the user exits. This works ok but the GridView page url always displays the last page param passed back - even if the user has since moved to a different page. Whilst this doesn't affect the functionality it doesn't look right.
Am I doing the correct procedure to maintain pageindex or are there other techniques or uses of the FormUtil class that I've missed?
Example code:
GridView List page
Load
myGridView_SelectedIndexChanged()
FormView Edit page
FormUtil.RedirectAfterCancel( FormView1, string.Format( "MyListPage.aspx?page={0}", Request.Params["page"]) );