You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it run success, but Problem is when i have ~/Home/Article/123 and I go to ~/Home/Gallery/456
Next I click on treeview to go back Article, it set wrong ID parameter in article, It get Gallery's id set for Article's Id look like: ~/Home/Article/456.
Anyone have solver?. Sorry about my english, it bad.
The text was updated successfully, but these errors were encountered:
I using MvcSiteMapProvider to create treeview navigator in Asp.net MVC 4
I have 2 link like:
~/Home/Article/{id} and ~/Home/Gallery/{id}
my Treeview like: Home -> Article -> Gallery
And I used dynamic code on Controller
[MvcSiteMapNode(Title = "Article", ParentKey = "Home", Key="Article", PreservedRouteParameters="id")]
public ActionResult Article(int id)
{
ViewBag.Id = id;
return View();
}
[MvcSiteMapNode(Title = "Gallery", Key="Gallery" ParentKey = "Article", PreservedRouteParameters="id")]
public ActionResult Gallery(int id)
{
ViewBag.id = id;
return View();
}
So it run success, but Problem is when i have ~/Home/Article/123 and I go to ~/Home/Gallery/456
Next I click on treeview to go back Article, it set wrong ID parameter in article, It get Gallery's id set for Article's Id look like: ~/Home/Article/456.
Anyone have solver?. Sorry about my english, it bad.
The text was updated successfully, but these errors were encountered: