using System.Collections.Generic;
using System.Web.Mvc;
namespace HDDTest0818.Controllers
{
public class HomeController : Controller
{
//here is where you would declare your List variable public so that scope of this variable can be within the entire class...
// public List<string> someList = new List<string>();
public ViewResult Index()
{
/*public*/ List<string> someList = new List<string>();
//you need to get rid of public before you create your List variable
// if you want to declare this list variable as public you need to do it outside of the method (Index())..
return View();
}
}
}

Let me know if this helps!

Email codedump link for Can&#39;t return view from controller when creating a list