I have a very simple list of programming languages stored in a database, such as, C#, Java, F# etc. and these are listed in a razor view. To see the detail of it when then url like ...\language\java works but for ...\language\C# and ...\language\C# did not work.
The hash sign (#) is ignored and in Action the id parameter is "C" instead of "C#" and "F" instead of "F#".
Here is the code
@foreach (var item in Model.Languages)
{
<li>
<a href="/Language/@item.Title">@item.Title</a>
</li>
}
When click on the link then it will call Detail Action in Language controller with parameter such as java, C# etc. But in action method I get id="C" instead if "C#"
Can you please help me how to handle this scenario.
HREF? or are you using@Html.ActionLinkorUrl.Action?#is a fragment identifier and the browser does not send anything in a url after the#symbol (consider using../language/CSharpinstead)To see the detail of it when then url like ...\language\java works but for ...\language\C# and ...\language\C# did not work.Please show us that code.