Building the Id of CheckBox in Jquery
<p>I have a DropDownList:<br/></p>

<pre><code> @Html.DropDownList("name", (IEnumerable&lt;SelectListItem&gt;)SlotList[counter], new { id = "slotDDL_" + @item.ResourceID, tid = @item.ResourceID, @class = "slotDDL_ text white" })
</code></pre>

<p>and a CheckboxFor:</p>

<pre><code>@Html.CheckBoxFor(modelItem =&gt; item.IsSelected, new { @class = "boxcheck_", id = @item.ResourceID })
</code></pre>

<p>When executing this:</p>

<pre><code> $('.slotDDL_').change(function () {
            var resId = $(this).attr("tid");
            IsSelected = 'boxcheck_' + resId;
            alert($('#' + resId).attr("checked"));
      });
</code></pre>

<p>I get the following : </p>

<pre><code>alert($(this).attr("tid"))====&gt;505
alert(IsSelected)====&gt; boxcheck_505
alert($('#' + resId).attr("checked"))===&gt;undefined
</code></pre>

<p><strong>Question:</strong>
How can I successfully build the string of my Id ? What am I doing wrong ? </p>
