开发者

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 开发者_Go百科words to be displayed on the page.

Thanks for the help. :)


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


Try Html.ActionLink instead.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜