Update HTML.HiddenFor value with selected value form Dropdownlist
<p>I have a simple form of sales information which users edit comments and reasons and then using the SaveChanges() function the data gets committed back to the database. 
I need to update a field which contains an ID number. I have a simple dropdownlist (populated by a viewbag) and when the user makes a change I want to update the ID number in the hiddenfor field so it can be posted back on save.
My code is below:</p>

<p>EditorTemplate</p>

<pre><code>   &lt;tr&gt;
@Html.HiddenFor(modelItem =&gt; modelItem.ID)
@Html.HiddenFor(modelItem =&gt; modelItem.tblTaggingGroupID)
@Html.HiddenFor(modelItem =&gt; modelItem.FinYear)
@Html.HiddenFor(modelItem =&gt; modelItem.FinWeek)
@Html.HiddenFor(modelItem =&gt; modelItem.WeekDay)
@Html.HiddenFor(modelItem =&gt; modelItem.Segment)
@Html.HiddenFor(modelItem =&gt; modelItem.NetSales)
@Html.HiddenFor(modelItem =&gt; modelItem.SwellSales)
@Html.HiddenFor(modelItem =&gt; modelItem.SpikeSales)
@Html.HiddenFor(modelItem =&gt; modelItem.BaseSales)
@Html.HiddenFor(modelItem =&gt; modelItem.tblTaggingReasonID)
&lt;td&gt;
    @switch (Model.WeekDay)
    {
        case 1:
            @:Sunday
            break;
        case 2:
            @:Monday
            break;
        case 3:
            @:Tuesday
            break;
        case 4:
            @:Wednesday
            break;
        case 5:
            @:Thursday
            break;
        case 6:
            @:Friday
            break;
        case 7:
            @:Saturday
            break;
        default:
            break;
    }
&lt;/td&gt;
&lt;td&gt;
    @Html.DisplayFor(modelItem =&gt; modelItem.Segment)
&lt;/td&gt;

&lt;td&gt;
    @Html.DisplayFor(modelItem =&gt; modelItem.NetSales)
&lt;/td&gt;
&lt;td&gt;
    @Html.DisplayFor(modelItem =&gt; modelItem.SwellSales)
&lt;/td&gt;
&lt;td&gt;
    @Html.DisplayFor(modelItem =&gt; modelItem.SpikeSales)
&lt;/td&gt;
&lt;td&gt;
    @switch (Model.Recurring)
    {
        case true:
            Model.Recurring.ToString();
            break;
        case false:
            Model.Recurring.ToString();
            break;
        default:
            break;
    }
    @Html.EditorFor(modelItem =&gt; modelItem.Recurring)
&lt;/td&gt;

&lt;td&gt;@Html.DropDownListFor(modelItem =&gt; modelItem.tblTaggingReasonID, (SelectList)ViewBag.Reasons, "Please Select")&lt;/td&gt;
&lt;td&gt;
    @Html.EditorFor(modelItem =&gt; modelItem.Comment, new { @class = "Commenttxt" })
&lt;/td&gt;
</code></pre>

<p></p>

<p>Controller:</p>

<pre><code>        public ActionResult Index()
    {
        var SelectedID = Convert.ToInt32(Session["_SessionSelectGroupID"]);
        var SelectedYear = Convert.ToInt32(Session["_SessionSelectFinYear"]);
        var SelectedWeek = Convert.ToInt32(Session["_SessionSelectFinWeek"]);
        var tblTaggingGroupInstances = db.tblTaggingGroupInstances.Include(t =&gt; t.tblTaggingGroup);

         ViewBag.Reasons = new SelectList(db.tblTaggingReasons,"ID","UpliftReason");

        return View(tblTaggingGroupInstances.Where(t =&gt; t.tblTaggingGroupID == SelectedID &amp;&amp; t.FinYear == SelectedYear &amp;&amp; t.FinWeek == SelectedWeek).ToList());
    }
    [HttpPost]
    public ActionResult Index(List&lt;tblTaggingGroupInstance&gt; model)
    {
        foreach (var record in model)
        {
            db.Entry(record).State = EntityState.Modified;
        }
        db.SaveChanges();
        return RedirectToAction("Details");
    }
</code></pre>

<p>I'm assuming this can be done with some simple JQuery or Javascript but, everything I have tried so far falls over?</p>