我正在尝试Byte[]
通过将 View 中的字符串转换为控制器来发送@Html.ActionLink
。当我点击ActionLink
它时,每次都会抛出异常。我在这里附上代码。
例外
操作点击后的 URL
http://localhost:55253/Member/Create?customerContactNumber=0439349
&committeeId=AAAAAAAADLc%3D
查看代码
@using VolunteerPoints.BootstrapSupport
@model Tuple<VolunteerPoints.Models.Contact, IEnumerable<VolunteerPoints.Data.Committee>>
@{
ViewBag.Title = "SearchResults";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Activity Search Results</h2>
<table id="Activitieslist" class="table table-striped table-bordered table-hover .table-condensed">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Item2.GetEnumerator().Current.Committee_Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Item2.GetEnumerator().Current.Committee_Type)
</th>
<th></th>
</tr>
</thead>
@foreach (var model in Model.Item2)
{
<tr>
<td>
@Html.DisplayFor(modelItem => model.Committee_Name)
</td>
<td>
@Html.DisplayFor(modelItem => model.Committee_Type)
</td>
<td>
<div>
<div>
@Html.ActionLink("Select", "Create","Member", new
{customerContactNumber = Model.Item1.Number, committeeId =
Convert.ToBase64String(model.Committee_Id) }, new { @class = "btn btn-primary" })
</div>
</div>
</td>
</tr>
}
</table>
@section Scripts {
@Styles.Render("~/Content/DataTables/css")
@Scripts.Render("~/bundles/DataTables")
<script type="text/JavaScript">
$(document).ready(function () {
$('#Activitieslist').dataTable({
"bSort": true,
"bPaginate": false,
"bAutoWidth": false,
});
});
</script>
}