c# - Using HTML.ActionLink with a <li> -
i doing front-end dev work , being exposed c# first time. trying change menu navigation each list item clickable, rather inside each list item. example (if static html):
<li><a href="#">link</a></li>
change to
<a href="#"><li>link</li></a>
this menu using html.actionlink however, looks this:
<li>@html.actionlink("blah", "index", "blahblah", new { area = "shared" }, null)</li>
how change link applied whole list item?
thanks!
you may use url.action
method along typical html markup.
<a href="@url.action("index","home")" title="go home"><li>link</li></a>
this generate markup this
<a href="home/index" title="go home"><li>link</li></a>
change parameters(action method/controller names) values of url.action method needed.
url.action
helper method generates qualified url action method.
Comments
Post a Comment