In the MVC view, I have a 'for' command, which in each value I want to write the specified tag.
I will show you a simple example:
@for (var i = 0; i < 4; i++) { <div> @(switch (i) { case 0: ??? //write "<div>Custom Value 1</div>" break; case 1: ??? //write "<span>Custom Value 2</span>" break; }) </div> }
I am using the MVC4 Razor view.
Thanks for your time in advance.
source share