Cannot seem to find the code that relates to this implementation in VB but I have an action link which currently displays as a hyperlink:
@Html.ActionLink("Edit", "Edit", New With {.id = currentItem.CustomerId})
But would like it to be displayed as a button instead as am using twitter bootstrap and the buttons defined in the CSS look amazing. I know how to define a button link normally but how would I change the action link to one?
Set the CSS class property to btn.
@Html.ActionLink("Edit", "Edit", New With {.id = currentItem.CustomerId}, New With {.class = "btn"})
you should do a extension method
public static class MVCExtensions
{
public static string SubmitButton(this HtmlHelper helper, string buttonText)
{
return String.Format("<input type=\"submit\" value=\"{0}\" />", buttonText);
}
}
then you call in code
@Html.SubmitButton("Save")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With