KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm looking for a way to alter the class of an ActionLink in the controller based on specific criteria (not found in the model so I can't write a conditional in the view itself). But i can't seem to find the ViewData("name") that allows me to work w/ this element (I assume this is possible, but I'm missing something). I have an html helper like so in my view <%=Html.ActionLink("View", "Index", "Home")%> But in my controller I'm not sure how to reference this, like the below to add an attribute like class or onclick. ViewData("View").attributes.add("class", "active")
Tags (comma-separated)
Save Edits
Cancel