Getting Action name in View (ASP.NET MVC2) -
i want current action name in master page, can find "current" page link , mark "current".
here view code snippet master page:
<ul> <li> <a href="<%= url.action("index", "admin")%>" class="main current">index</a> </li> <li> <a href="<%= url.action("show", "admin")%>" class="main">show</a> </li> <li> <a href="<%= url.action("delete", "admin")%>" class="main">delete</a> </li> </ul>
as can see, index hyperlink has class of "current", makes highlighted via css files.
i want check action user visiting, , make hyperlink "current" respect that. have searched through web, , wondering best solution that?
also, appreciate if guys have other suggestions accomplishing task.
thanks in advance, sadullah
ps: though found solution, there must nicer way this.
Comments
Post a Comment