Newbie type question
I have the following function to set a grids title and fields (dynamic grid)
The Model variables can contain Swedish characters
But when this is all passed to the client , the swedish characters look like this.
The Grid handles this fine, until it goes to export the Grid to Excel. The columns are fine , but the titles are how the rendered function looks.
My assumption that this is caused because of the conversion happening when setting from the model variable.
Appreciate any ideas people have :)
Razor is a HTML-rendering engine, and is HTML-escaping each @...
substitution. If you know your content is HTML-safe, you can mark it so:
field: "@Html.Raw(d.field)"
(and analogously for any other place where you are injecting content in JS strings and not in HTML).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.