开发者

How can I use the HtmlHelper methods to create hyperlinks?

开发者 https://www.devze.com 2023-01-30 00:17 出处:网络
<div id=\"topmenu\"> <ul> <li>Inicio</li> <li>Anuncios</li> <li>Registrate</li>
<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

精彩评论

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