A
A
AlbertR2015-07-24 01:08:29
ASP.NET
AlbertR, 2015-07-24 01:08:29

ASP.NET 5 why html doesn't display cyrillic?

How to make sure that when forming the html page, the words were in Cyrillic, and not in the encoding?
Controller example.

public IActionResult Index()
{
return View(db.Products.ToList());
}

Index.cshtml example
@model List<Product>
@foreach (var product in Model)
{
<a asp-controller="Product" asp-action="Show" asp-route-name="@product.CaseName">
}

As a result, when viewing the markup in the browser, the link will be of this type.
<a href="/%B2%D0%B0%D1%BE">&#x421;&#x440;</a>
How can you get such a result?
<a href="Тостер">Тостер</a>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pm_oman, 2015-07-24
@pm_oman

wpnew.ru/udobnaya-rabota/uchimsya-rabotat-s-teksto...
Helped me

A
AlbertR, 2015-07-24
@AlbertR

It doesn't work, this problem is hidden in the entity framework, because if I just add something in Russian in the file, it will be displayed correctly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question