This is probably really basic in C#, but I looked around a lot to find a solution.
In my MVC controller\'s action method, I have an incoming routeid (programid
programid
the scope of the account type variable is in the { } of the if. you need to declare the variable outside the if to be able to use it after, or even better:
{
}
string accounttype = programid == 0 ? "Membership" : "Program";