开发者

How can I create links for my website?

开发者 https://www.devze.com 2023-01-10 06:17 出处:网络
I\'m trying to make a little side-bar menu so people can access area of the web application. Here is what I have so far:

I'm trying to make a little side-bar menu so people can access area of the web application.

Here is what I have so far:

<ul id="navi">
                <li><img src="../../Content/inicio.png" alt="Inicio" /></a></li>
                <li><img src="../../Content/evaluaciones.png" alt="Evaluaciones" />&l开发者_JS百科t;/a></li>
                <li><img src="../../Content/miembros.png" alt="Miembros" /></a></li>
            </ul> 

What is the MVC way of creating links?

Since this markup is on the Master Page, I'm thinking I'd need to specify the Area and also the Action to send the user to correct?

For example, I want the user to be taken to the Carreras/Index view when they click the third img, how can I do that?


<%=Html.ActionLink("Action Text", "Index", "Carreras")%>

is the standard way of creating an anchor/action link. There are multiple ways to link an image ... I typically use Url.RouteUrl, but any of the methods in this post would work.

0

精彩评论

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

关注公众号