0
I have the following string written in C#:
string Descricao = "Você ficou muito tempo inativo, e por isso sua sessão caiu. Retorne para a página inicial para continuar."
I would like to put the excerpt sessão caiu
of the string within an HTML tag, more or less like this:
Descricao = "Você ficou muito tempo inativo, e por isso sua <span style="font-weight: bold">sessão caiu</span>. Retorne para a página inicial para continuar."
Is it possible? I’m trying according to the code above, but I’m getting it:
It certainly is. You yourself did this in the question example.
– Jéf Bueno
@LINQ is not working when I show the string. It is as shown in the image.
– Ricardo Alves
@Ricardoalves This is the kind of thing that should be in the question, it is not easy to deduce this. Anyway, another important thing that you do not have in your question: what code you use to display this string?
– Jéf Bueno
@LINQ, this string is a property of a class called
MensagemErro
. An object ofMensagemErro
is passed to the view using Viewbag, and then I show it like this:@mensagemErro.Descricao
– Ricardo Alves