简体   繁体   中英

ASP.Net MVC TreeView using JQuery - persist by location and cookie

So as the name suggest I have a treeview in an mvc view that persists by its location but sometimes you travel off the route of the tree, for example:

Main page

----Child Page

Say i went to an edit page for the details on the child page, I would still technically be in the child page node but the url for the page is different.

If I use persist: location then it works when I'm on pages that correspond to the links but not when I move to a page not in the list. If I use persiste: cookie then it works if i travel down the nodes but if I use a different link "back" for example then the treeview will remember its previous location and not the new one.

Is there a way using Jquery to get the best of both scenarios, ie, persist by location if the location matches and by cookie if it doesn't?

8个月后,我猜答案是否定的。无法完成。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM