Skip to content

Instantly share code, notes, and snippets.

@celston
celston / ColorTabs.cshtml
Last active August 21, 2017 22:24
MVC Razor Dynamic Sections
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
ViewBag.Tabs = new List<Tuple<string, string>>()
{
new Tuple<string, string>("Red", "Red"),
new Tuple<string, string>("Yellow", "Yellow"),
new Tuple<string, string>("Blue", "Blue"),
new Tuple<string, string>("Green", "Green")
};
public abstract class AsyncCommand : Command
{
public override void Execute(CommandContext context)
{
if (context == null)
return;
try
{
Context.ClientPage.Start(this, "Run", PrepareArgs(context));