To pass the index on to another page, you need to maintain the index some way between pages. Querystring is one way to do it, but you can also use Session variables, or even a cookie. See
http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/ for more info. In your case using the querystring is the best option, but if you don't want to use it then go with
Session. Storing an single index isn't going to tax your server, plus you really won't need to worry about Session timeouts or whatnot for something like this.
dwhite
Star
8990 Points
1423 Posts
Re: Maintaining Accordion panel selected state across postbacks
Oct 06, 2007 01:28 AM|LINK
To pass the index on to another page, you need to maintain the index some way between pages. Querystring is one way to do it, but you can also use Session variables, or even a cookie. See http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/ for more info. In your case using the querystring is the best option, but if you don't want to use it then go with Session. Storing an single index isn't going to tax your server, plus you really won't need to worry about Session timeouts or whatnot for something like this.
-Damien
Latest Blog Post: BDD with ASP.NET MVC and Cucumber
shashi.sorou...
Member
6 Points
3 Posts
Re: Maintaining Accordion panel selected state across postbacks
Aug 27, 2008 08:12 AM|LINK
hi i have tried all the solutions provided this forums and other forms but nothing woks
because when u are redirecting the page it actually calls the get method not the post method.
so accordain can not maintain its seleted pane.
to do so you have to store the acordain seleted index in session and programaticaaly set the index of accordain during postbacks/
Senior Software Engineer
New Delhi India