Answer the question
In order to leave comments, you need to log in
How to pass HtmlAttribute to another controller method through ActionLink?
How to pass HtmlAttribute to another controller method through ActionLink?
@Html.ActionLink((string)ViewBag.User.Login, "User","WatchProfile", new { id = ViewBag.UserId}) - this is how it passes the Menu controller, the method is correct
@Html.ActionLink((string)ViewBag.User .Login, "User", "WatchProfile") - passes as it should, but since attribute no error
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question