You could work around this, by replacing the slash.
ActionLink(item.InterfaceName.Replace('/', '-'), ....)
After this your link would look like this: localhost:1842/Interface/Name/FastEthernet0-0
.
Naturally, your ActionMethod in your controller will misbehave, because it will expect a well named interface, so upon calling the method you need to revert the replace:
public ActionResult Name(string interfaceName)
{
string _interfaceName = interfaceName.Replace('-','/');
//retrieve information
var result = db.Interfaces...
}
An alternative would be to build a custom route to catch your requests:
routes.MapRoute(
"interface",
"interface/{*id}",
new { controller = "Interface", action = "Name", id = UrlParameter.Optional }
);
Your method would be:
public ActionResult Name(string interfaceName)
{
//interfaceName is FastEthernet0/0
}
This solution was suggested by Darin Dimitrov here