In the view For vb code in the view I am setting a string with UTF-8 characters "Övriga frågor"
Then i assign this string to a javascript variable routers
But when the routerlist is assigned to routers the UTF-8 characters are not the same.
The alert displays the string as "Övriga frågor" some kind of encoding?
This javascript string is passed to server side vb code and I want to decode it back to the original string.
how can I do that?
Below is my code from a view in mvc
<div id='dashboardItemBody' style="align-content:center;width:100%;height:100%">
@Html.Action("_getRouter2")
</div>
@section scripts
$(function () {
var routers= endmed " + " @routerList ";
alert(routers);
});
</script>
end section
@Code
Dim routerList as string = "Övriga frågor"
End Code