delete
delete

Reputation:

How can I use the HtmlHelper methods to create hyperlinks?

<div id="topmenu">
    <ul>
        <li>Inicio</li>
        <li>Anuncios</li>
        <li>Registrate</li>
        <li>Ayuda</li>
        <li>Contacto</li>
    </ul>
</div>

How can I create links out of these elements? Html.Action()?

I don't see how to reference a controller and action AND set what the actual words to be displayed on the page.

Thanks for the help. :)

Upvotes: 0

Views: 610

Answers (2)

drsim
drsim

Reputation: 81

<%= Html.ActionLink("Your text here", "ActionName", "ControllerName") %>

Upvotes: 3

Mikael Eliasson
Mikael Eliasson

Reputation: 5227

Try Html.ActionLink instead.

It creates a hyperlink and the first argument is the text to be displayed

Upvotes: 1

Related Questions