-2

I have

<h3 class="panel-title">
            "@(System.Configuration.ConfigurationManager.AppSettings["OST"] == "true" ? "Out-of-State Travel" : "Out-Service Training/Out-of-State Travel")"
        </h3>

however it is rendering with the quotes

it shows up as "Out of State Travel". or "Out-Service Training/Out-of-State Travel"

Bryan Dellinger
  • 4,724
  • 7
  • 33
  • 79

2 Answers2

0

Remove the quotes around the ternary operation:

@(System.Configuration.ConfigurationManager.AppSettings["OST"] == "true" ? "Out-of-State Travel" : "Out-Service Training/Out-of-State Travel")
haldo
  • 14,512
  • 5
  • 46
  • 52
0

Just remove the quotes:

<h3 class="panel-title">
            @(System.Configuration.ConfigurationManager.AppSettings["OST"] == "true" ? "Out-of-State Travel" : "Out-Service Training/Out-of-State Travel")
        </h3>
Ricardo Alves
  • 1,071
  • 18
  • 36