mvc3は初めてです。選択した人にボタンをクリックしたときに、選択した人にメールを送信するのを手伝ってください。名前と電子メールとチェックボックスも表示するテーブルがあります。チェックボックスをクリックすると、そのメールアドレスにメールが送信されます。
@model IEnumerable<ConferenceRoomProject.Models.Users>
@using (Html.BeginForm("InviteAttentees", "Booking", FormMethod.Get))
{
@Html.DropDownList("Departments", new SelectList(ViewBag.departments))
<input type="submit" value="Filter"/>
}
<table>
<tr>
<td>
<a href="@Url.Action("MyMeetings", "Event")" title="Invite">
<img src="../images/invite.png" width="40px" height="30px" alt="Edit"/>
</a>
</td>
</tr>
</table>
<table id="tblInviteAttentees">
<caption>Invite Attentees</caption>
<tr>
<th>
Name
</th>
<th>
Email
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td>
<input type="checkbox" name="chkEmployee" id="chkEmployee"/>
</td>
</tr>
}
</table>