0

I have a link that looks like this:

<a class="btn btn-primary edit" 
   href="Personas/details/<?php echo $persona['Persona']['id']; ?>" 
   data-original-title="Editar">

    <i class="icon-pencil icon-white"></i>
</a>

As you can see I'm manually writing in the controller and action for the link. Is there some way to make this not as brittle?

Something like:

<a href="Url.Action("Personas", "Details", array('id', 1);" >Asdf</a>
sergserg
  • 21,716
  • 41
  • 129
  • 182

1 Answers1

0

Use: Html->url, does exactly what you want.

zeebonk
  • 4,864
  • 4
  • 21
  • 31