Resetting ActiveViewIndex in a MultiView after leaving page....

wings9697

Member
Joined
Aug 27, 2007
Messages
23
Location
Washington, DC
Programming Experience
10+
Hi, this sounds like it should be simple, but it's stumping me..

I have a form with a MultiView control containing 2 Views. The first does a SQL sort to find all records (representing each transaction's packet of forms) for an individual user. When a record is selected, control is sent to the second view, which has individual listings for each form in this particular "packet". From there, you can click a button next to the form in this "packet" and go to the desired form on a new page. The problem is when the form page is closed from the close button (using Response.Redirect ) on the form page, control is passed back to the MultiView page, but to the first view, not the second view that I originally left from.

I've tried resetting the ActiveViewIndex by putting an IF...Then block in the Page Load Function, but that had no effect. Can someone point me in the right direction?
 
Store the current index in Session when you move to new page, set index to this value when you move back to this page (check IsPostback). If you want to preserve server memory usage and not use Session you can read in documentation about "cross-page posting" and "pass information between webforms".
 
Back
Top