Formu gönderdiğinizde, bu nedenle eylem yöntemi çağrılmadığında bu hatayı alıyorum:
Aynı anahtara sahip bir öğe zaten eklenmiş.
Ve istisna ayrıntıları:
[ArgumentException: Aynı anahtara sahip bir öğe zaten eklenmiş.]
System.ThrowHelper.ThrowArgumentException (ExceptionResource
source ) +52 System.Collections.Generic.Dictionary`2.Insert (TKey anahtarı, TValue değeri, Boolean add) +9382923 Sistem .Linq.Enumerable.ToDictionary (IEnumerable`1 kaynak, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 karşılaştırıcı) +252
System.Linq.Enumerable.ToDictionary (IEnumerable`1 kaynak, Func`2 keySelector, IEqualityComparer`1 karşılaştırıcı) +91
System.Web.Mvc.ModelBindingContext.get_PropertyMetadata () +228 System.Web.Mvc.DefaultModelBinder.BindProperty (ControllerContext controllerContext, ModelBindingContext bağlamaContext, PropertyDescriptor propertyDescriptor) +392
System.Web.Mvc.DefaultModelBinder.BindProperties (ControllerContext controllerContext, ModelBindingContext bağlamaContext) +147
System.Web.Mvc.DefaultModelBinder.BindComplexElementalModel (ControllerContext controllerContext, ModelBindingContext bağlamaContext, Nesne modeli) +98
System.Web.ModelMod.Dod.Bod.Mod.Da.OrtaMod.Dadak.Mod.Da.OrtaMod.Dadak.com controllerContext, ModelBindingContext bağlamaContext) +2504
System.Web.Mvc.DefaultModelBinder.BindModel (ControllerContext controllerContext, ModelBindingContext bağlamaContext) +548
System.Web.Mvc.ControllerActionInvoker.GetParameterValue (ControllerContext controllerContext) Bağlam, ParameterDestor3 parametresi
System.Web.Mvc.ControllerActionInvoker.GetParameterValues (ControllerContext controllerContext, ActionDescriptor actionDescriptor) +181
System.Web.Mvc.ControllerActionInvoker.InvokeAction (ControllerContext controllerContext, String actionName) +830 System.Web.Mvc.Controller.Execute (xecute)) .Web.Mvc.ControllerBase.Execute (RequestContext requestContext) +111
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute (RequestContext requestContext) +39.
System.Web.Mvc. <> C__DisplayClass8.b__4 () +65 System.Web.Mvc.Async. <> C__DisplayClass1.b__0 () +44 System.Web.Mvc.Async. <> C__DisplayClass8`1.b__7 (IAsyncResult _ ) +42 System.Web.Mvc.Async.WrappedAsyncResult`1.End () +141 System.Web.Mvc.Async.AsyncResultWrapper.End (IAsyncResult asyncResult, Nesne etiketi) +54
System.Web.Mvc.Async.AsyncResultWrapper. End (IAsyncResult asyncResult, Object etiketi) +40
System.Web.Mvc.MvcHandler.EndProcessRequest (IAsyncResult asyncResult) +52
System.Web.Mvc.MvcHvcler.System.Web.IHttpAsyncHandler.EndProcessRequest ( IAsyncResult sonucu)
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () +8836913 System.Web.HttpApplication.ExecuteStep (IExecutionStep adımı, Boolean ve tamamlandıSenkronize) +184
Sayfaya bak
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/XYZ.Master"
Inherits="System.Web.Mvc.ViewPage<XYZ.Models.Admin.AdminSegmentCommissionsModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Create
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% using (Html.BeginForm()) {%>
<div class="box3">
<div class="userinfo">
<h3>Admin Segment Commissions</h3>
</div>
<div class="buttons-panel">
<ul>
<li>
<input type="submit" value="Save" class="save" />
</li>
<li>
<%:Html.ActionLink("Cancel", "Index", new { controller = "AdminSegmentCommissions" }, new { @class = "cancel" })%>
<%--<input type="button" value="Cancel" class="cancel" onclick="document.location.href='/AirlineLedgerTransactionReceiver/Index'" />--%>
</li>
</ul>
</div>
</div>
<div class="row-1">
<div class="form-box1 round-corner">
<div class="form-box1-row">
<div class="form-box1-row-content float-left">
<div>
<label>
<%: Html.LabelFor(model => model.FromSegmentNumber) %></label>
<%: Html.TextBoxFor(model => model.FromSegmentNumber) %>
<%: Html.ValidationMessageFor(model => model.FromSegmentNumber) %>
</div>
</div>
</div>
</div>
</div>
<%} %>