<table id="assignments" class="display">
<thead>
<tr>
<th>
<span style="font-style: italic;">Insurance Group</span>
</th>
<th>
<span style="font-style: italic;">Products</span>
</th>
<th>
<span style="font-style: italic;">Assignment</span>
</th>
</tr>
</thead>
<tbody>
@For Each row In _assignments
@<tr class="assignmentsRow">
<td id="insGrpTD">
@row.InsuranceGroupKey
@row.GroupName
</td>
<td id="ProductTD">
@row.ProductKey
@row.ProductName
</td>
<td id="assignmentSelectList">
<select id="@row.GetHashCode.ToString">
@For Each choice As SelectListItem In ViewBag.assignmentChoices
@If row.ClassificationChoice Is Nothing Then
@<option value="Not Assigned">
Not Assigned
</option>
Else
@<option value="@choice.Text">@choice.Text</option>
End If
Next
</select>
</td>
</tr>
Next
</tbody>
</table>
I am using a DataTable in an MVC 4 application using VB.net and Razor syntax.
I have want to be able to get the selected text of my dropdown in the third column so I can use it elsewhere in my view, send it to my Controller, etc
Please help!
<thead>
<tr>
<th>
<span style="font-style: italic;">Insurance Group</span>
</th>
<th>
<span style="font-style: italic;">Products</span>
</th>
<th>
<span style="font-style: italic;">Assignment</span>
</th>
</tr>
</thead>
<tbody>
@For Each row In _assignments
@<tr class="assignmentsRow">
<td id="insGrpTD">
@row.InsuranceGroupKey
@row.GroupName
</td>
<td id="ProductTD">
@row.ProductKey
@row.ProductName
</td>
<td id="assignmentSelectList">
<select id="@row.GetHashCode.ToString">
@For Each choice As SelectListItem In ViewBag.assignmentChoices
@If row.ClassificationChoice Is Nothing Then
@<option value="Not Assigned">
Not Assigned
</option>
Else
@<option value="@choice.Text">@choice.Text</option>
End If
Next
</select>
</td>
</tr>
Next
</tbody>
</table>
I am using a DataTable in an MVC 4 application using VB.net and Razor syntax.
I have want to be able to get the selected text of my dropdown in the third column so I can use it elsewhere in my view, send it to my Controller, etc
Please help!