<li class="rtsLI" id="Summary"><a href="javascript:void(0);" onclick="javascript:rtsXXX.OnClientTabSelected(this, 0);" class="rtsLink"><span class="rtsTxt">Test</span></a></li>
Above I am replacing with following actionlink:
<li class="rtsLI" >@Html.ActionLink("test1", "Index", new { Area = "Area1", Controller = "controller1" }, new { @class = "rtsLink rtsTxt"})</li> "
At first css is working fine. But when using Actionlink, css not working. Thanks
The standard ActionLink helper always HTML encodes the link text. This means that you cannot use it if you want to render HTML inside. You have 3 possibilities:
rtsTxt
class could directly be applied to the linkWrite a custom ActionLink helper that doesn't HTML encode the text and which would allow you to generate the same markup:
and then:
Use the Url.Action helper:
Best option will be to use
@Url.Action
extension methodWrite code this way: