I have an ActionLink that looks like this:
@Html.ActionLink(Model.Name, "Details", "Appointments", new { id = Model.Id }, new { @class = "btn btn-default" })
It works, but I would like to enhance it to something that can change the height of the rendered button according to a Size property in the Model. I have not figured out how to write that piece of code and get it to work. I want something like this in "pseudo-code:
@Html.ActionLink(Model.Name, "Details", "Appointments", new { id = Model.Id }, new { @class = "btn btn-default", height=Model.Size })
I hope someone would be able to show how this could should be written for it to work.
I found a solution that works, in the direction you pointed ashik! Thank you for your help.
It works by assigning for instance the string "height: 100px" to the Size property of the viewmodel in the controller.