I\'m trying to do something different. I have a view that contains an Id. Based on the value of the Id I want to change my heading that appears. Something like:
Your switch needs to be completely enclosed in a block and it needs to be "broken" properly:
// Use the @{ } block and put all of your code in it
@{
switch(id)
{
case "test":
// Use the text block below to separate html elements from code
Test Site
break; // Always break each case
case "prod":
Prod Site
break;
default:
WTF Site
break;
}
}
Because the tags are enclosed html blocks by themselves, you may not need the
blocks for separation. It's just my habit to include them.