我是 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>