How to perform switch case conditional operation in view?
It is similar to if, we just need to write switch statement. Notice how beautifully we are able to mix the C# and HTML code.
@switch (fileName) { case "itfunda": <p>itfunda logo</p> break; case "dotnetfunda": <p>dotnetfunda logo</p> break; default : <p>no logo</p> break; }
No comments:
Post a Comment