Reputation: 97
Below is my action link . How shall I apply css to the following? Actually i want to give the class as we do in asp.net simple application. Please tell me what shall I do?
Upvotes: 1
Views: 1151
Reputation: 13804
I'm not a .net developer, but replace your ActionLink code with this:
<%=Html.ActionLink("Forgot password?", "ForgotPassword", new { @class="my_class" })%>
And add this to your CSS:
.my_class {
color: #fff;
}
Upvotes: 3
Reputation: 22016
You should use:
<%=Html.ActionLink("Forgot password?", "ForgotPassword", new{ @class="classname" }) %>
Upvotes: 1
Reputation: 33857
You supply HTML attributes as anonymous objects:
<%=Html.ActionLink("Forgot password?", "ForgotPassword", new{ @class="MyCSSClass" })%>
Upvotes: 1