Tag Helper forms: asp-for not working as expected
<p>Thanks for the help so far. I've worked to make sure everything else works so I can focus on this problem. I'm still convinced it'll be an easy fix once we've cracked it. I have the following code, sorry I changed it so much, I had to start again after I made a real mess of the last one without taking a backup.</p>

<pre><code>        public IActionResult Index()
    {

        if(IndexModel.GlobalTasks == null)
        {
            IndexModel initModel = new IndexModel();
            initModel.AllTasks = InitList();
            initModel.EmptyTask = new ToDoTask();
            IndexModel.GlobalTasks = initModel.AllTasks;
        }
        IndexModel model = new IndexModel();
        model.AllTasks = IndexModel.GlobalTasks;
        model.EmptyTask = new ToDoTask("");
        return View(model);
    }
    //Create Task
    public IActionResult Create(ToDoTask indexModel)
    {
        IndexModel.GlobalTasks.Add(indexModel);
        return RedirectToAction("Index");
    }
</code></pre>

<p>And:</p>

<pre><code>@model DE.Models.IndexModel
&lt;h2&gt;To Do List&lt;/h2&gt;
&lt;form asp-action="Create"&gt;
    &lt;input asp-for="EmptyTask" value="@Model.EmptyTask" /&gt;
    &lt;input asp-for="EmptyTask.TaskDetails" placeholder="New Task" /&gt;
    &lt;button type="submit"&gt;Add Task&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>The good news is this creates a new ToDoTask. So the Controller code must be pretty close to spot on. The problem is the View is passing null details to the controller, so I'm getting an empty Task, which isn't what I want. 
Any ideas?</p>