Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter get Wrong value in MVCSitemapprovider #159

Closed
ngquoctrong opened this issue May 3, 2013 · 2 comments
Closed

Parameter get Wrong value in MVCSitemapprovider #159

ngquoctrong opened this issue May 3, 2013 · 2 comments

Comments

@ngquoctrong
Copy link

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.

@NightOwl888
Copy link
Collaborator

I am pretty sure this is the same issue with a fix described in #154. Try this fix to see if it works.

@NightOwl888
Copy link
Collaborator

I have now fixed #154 in v4. Closing this issue as it appears to be a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants