0

I have resource string:

WelcomeText | "Hello, welcome to <a href="{0}" target="_blank">Stack Overflow</a>!"

And a web.config variable:

<add key="https://www.stackoverflow.com">

And I format them together in a Model variable:

return new View("Welcome", new WelcomeViewModel
{
    WelcomeText = string.Format(Resources.Resources.WelcomeText,
        ConfigurationManager.AppSettings["WelcomeText"];
});

And I display the variable in a view like this:

<div>@Model.WelcomeText</div>

My problem is now that when this text is displayed in my browser, it will output this, literally:

Hello, welcome to <a href="https://www.stackoverflow.com" target="_blank">Stack Overflow</a>!

I can't figure out an easy way to solve this, but my knowledge of ASP.NET MVC is limited. Can anyone help?

Philzax
  • 196
  • 6

0 Answers0