0

If i use below , button display bigger.

<a href="#" class="btn btn-primary"><i class="icon-plus"></i>Add</a>

If i use below , button display smaller than above code.

@Html.ActionLink("Add", "xx", "Law", new { _lawfileid = -1, baseappid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID }, new { @class = "btn btn-primary icon-plus" })

How can i change Html.Actionlink like a href i ?

What is difference between actionlink and href or how can i set same size for both ?

user3722851
  • 147
  • 4
  • 13

1 Answers1

0

The reason for your issue is that in the first line of code you have an element inside another element. Whereas in the second line of code you have a single element with extra class.

Similar question is already answered on stackoverflow. Please find the link below

Create an ActionLink with HTML elements in the link text

Since you need to build an element inside an element use @Url.Action as mentioned in the above link.

Ram Venkat
  • 84
  • 1
  • 10