-1

I want to change design of ActionLink below.

Please help me!

@Html.ActionLink("Edit", "Edit", new { id = Model.purchaseId })
GG.
  • 21,083
  • 14
  • 84
  • 130
dexter
  • 19
  • 1
  • 3
  • Please provide more details about what you want to change. Also, do let us know what you have tried so far – JPReddy Apr 15 '16 at 11:02

1 Answers1

2

I guess you want

@Html.ActionLink("Edit", "Edit", null, new{id=Model.purchaseId, @class="mycssclass"})

The overload you used has "routeValues" as 3rd parameter. My version ignores that and adds a 4th parameter for htmlAttributes.

Also, when you want to use reserved words (such as class) as properties, you can escape them with an @.

See the various overloads on MSDN.

Hans Kesting
  • 38,117
  • 9
  • 79
  • 111