Selecting related hidden value based on selected check boxes
<p>I am wondering if anyone can help me. I want to produce a string of user id's based on checkboxes being selected from a list.</p>

<p>My current code is:</p>

<pre><code>&lt;fieldset id="engineers" data-role="controlgroup"&gt;
@foreach (var item in Model.Maintenance_Team_List)
{
&lt;label&gt;&lt;input type="checkbox" name="Username"     /&gt;
@item.Username&lt;/label&gt;@Html.Hidden("Booked_Engineer_ID",item.UserID)
}
&lt;/fieldset&gt;
</code></pre>

<p>I have tried using jquery to check whether each username checkbox is selected or not. From there I am attempting to find its corresponding booked_engineer_id.</p>

<pre><code>var listed = $('#Username input:checked').each(function () {
        $("#engineer_div").find('#Booked_Engineer_ID').text();
    });
</code></pre>

<p>This however doesn't seem to be selecting anything. I am looking for a simple output such as 23,10,11,1 where these values represent the values in the selected checkboxes booked_engineer_id hidden field.</p>

<p>Thanks for any help.</p>
