I used to put the class of css in the action link like this:
<%: Html.ActionLink("Us", "Us", "Por", new { @class = "contactus" })%>
The purpose that I put the class is for the pop up of color box.
Now I have an action in my controller that return the result to the view like this :
return Redirect(@"~/Test/TestFirst?msg=Please complete all the information.");
Question : How can I add class = “contactus” to the return of my action ?
Thanks in advanced.
The Controller cannot and should not add css classes, this is the views responsibility. And it looks like you are stuffing a message in the query string, but it probably should be in the TempData
Controller:
View:
notice that TempData will survive a redirect.