최근에 RC에서 마이그레이션 된 VS 2010 릴리스가 설치되었으며 MVC 응용 프로그램이 더 이상 작동하지 않습니다. 더 구체적 : 새로운 고객 계정 생성을위한 몇 가지 단계가있는 마법사가 있습니다 (Jquery 양식 마법사, 실제로는 별 의미가 없습니다). 각 단계에는 회사, 고객, 라이센스 등 계정의 각 부분에 대한 형식화 된 부분보기가 포함되어 있습니다. 양식을 제출할 때 ModelState에서 실제로 이상하게 보입니다. Company :에 대해 중복 키가 있습니다. "Company"접두사가 붙어 있고없는 것입니다. 이런 식으로 뭔가 :ASP.NET MVC 2 이상한 동작
[6] "Company.Phone"문자열
회사는 실제로 널 (null)이기 때문에 모든 키에 대한 나의 모델 상태가 유효하지
[12] "전화"문자열
및 유효성 검사가 실패합니다. 그것이 RC 일 때 "회사"접두어가 붙은 그러한 키가 없었습니다. 그래서 "Release"를 설치 한 후에 "Company"라는 접두사가 붙은 ModelState의 키가 나타납니다. 홈페이지보기
<div id="registerSteps">
<div id="firstStep" class="step">
<fieldset>
<legend><%=Html.Encode(Register.CustomerInfo) %></legend>
<% Html.RenderPartial("CustomerInfo", ViewData["newCust"]); %>
</fieldset>
</div>
<div id="secondStep" class="step">
<fieldset>
<legend><%=Html.Encode(Register.CompanyInfo) %></legend>
<% Html.RenderPartial("CompanyInfo", ViewData["newComp"]); %>
</fieldset>
</div>
<div id="thirdStep" class="step">
<fieldset>
<legend><%=Html.Encode(Register.LicenceInfo) %></legend>
<% Html.RenderPartial("LicenceInfo", ViewData["newLic"]); %>
</fieldset>
</div>
<div id="lastStep" class="step">
<fieldset>
<legend><%=Html.Encode(Register.PrivacyStatement) %></legend>
<% Html.RenderPartial("PrivacyStatementInfo"); %>
</fieldset>
</div>
<div id="registerNavigation">
<input class="navigation_button" value="Back" type="reset"/>
<input class="navigation_button" value="Next" type="submit"/>
</div>
</div>
두 부분 조회수 (실제로 동일한 것을 보여주기 위해) : 회사 :
<div id="dCompanyInfo">
<div>
<div>
<%=Html.LocalizableLabelFor(company => company.Name, Register.CompanyName) %>
</div>
<div>
<%=Html.TextBoxFor(company => company.Name) %>
<%=Html.ValidationMessageFor(company => company.Name) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(company => company.Phone, Register.Phone) %>
</div>
<div>
<%=Html.TextBoxFor(company => company.Phone) %>
<%=Html.ValidationMessageFor(company => company.Phone) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(company => company.Fax, Register.Fax) %>
</div>
<div>
<%=Html.TextBoxFor(company => company.Fax) %>
<%=Html.ValidationMessageFor(company => company.Fax) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(company => company.Size_ID, Register.CompanySize) %>
</div>
<div>
<%=Html.ValueListDropDown(company => company.Size_ID, (CodeRoad.AQua.DomainModel.ValueList)ViewData["CompSize"], (string)ViewData["Culture"]) %>
<%=Html.ValidationMessageFor(company => company.Size_ID) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(company => company.Industry_ID, Register.Industry) %>
</div>
<div>
<%=Html.ValueListDropDown(company => company.Industry_ID, (CodeRoad.AQua.DomainModel.ValueList)ViewData["Industry"], (string)ViewData["Culture"]) %>
<%=Html.ValidationMessageFor(company => company.Industry_ID) %>
</div>
</div>
</div>
그리고 고객에 대한
<div id="dCustomerInfo">
<div>
<div>
<%=Html.LocalizableLabelFor(customer => customer.Email, Register.Email) %>
</div>
<div>
<%=Html.TextBoxFor(customer => customer.Email) %>
<%=Html.ValidationMessageFor(customer => customer.Email) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(customer => customer.Male, Register.Gender) %>
</div>
<div>
<%=Html.ListBoolEditor(customer => customer.Male, Register.Male, Register.Female, Register.GenderOptionLabel) %>
<%=Html.ValidationMessageFor(customer => customer.Male) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(customer => customer.FirstName, Register.FirstName) %>
</div>
<div>
<%=Html.TextBoxFor(customer => customer.FirstName) %>
<%=Html.ValidationMessageFor(customer => customer.FirstName) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(customer => customer.LastName, Register.LastName) %>
</div>
<div>
<%=Html.TextBoxFor(customer => customer.LastName) %>
<%=Html.ValidationMessageFor(customer => customer.LastName) %>
</div>
</div>
<div>
<div>
<%=Html.LocalizableLabelFor(customer => customer.Role_ID, Register.Role) %>
</div>
<div>
<%=Html.ValueListDropDown(customer => customer.Role_ID, (CodeRoad.AQua.DomainModel.ValueList)ViewData["OrgRole"], (string)ViewData["Culture"]) %>
<%=Html.ValidationMessageFor(customer => customer.Role_ID) %>
</div>
</div>
</div>
가 여기에 내 코드입니다 일부 집에서 만든 확장 방법 이었지만 이전 버전 (VS RC)에서는 꽤 잘 작동했습니다. 생성 된 Html도 괜찮습니다. "Company.Phone"과 같은 것은 없습니다. 그래서 "회사"가있는이 모든 키가 어디에서 왔으며 내가 그걸 어떻게 할 수 있을지 궁금합니다. 나는 어떤 해결책을 주셔서 감사합니다.