Model view controller MVC formcollection未显示所有控件
MVC formcollection未显示所有控件Model view controller MVC formcollection未显示所有控件,model-view-controller,drop-down-menu,formcollection,Model View Controller,Drop Down Menu,Formcollection,MVC formcollection未显示所有控件 [HttpPost] public ActionResult Create(EmployeeJOBModel EmployeeJOB, FormCollection Formcoll, string Module_Name) { } 对象Formcoll仅显示以下代码中的两个控件: 代码: 员工信息 <div class="editor-label"> @Html.Label
[HttpPost]
public ActionResult Create(EmployeeJOBModel EmployeeJOB, FormCollection Formcoll, string Module_Name)
{
}
对象Formcoll仅显示以下代码中的两个控件:
代码:
员工信息
<div class="editor-label">
@Html.LabelFor(model => model.Employee_Name)
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Employee_Name, new { @readonly = "readOnly" })
@Html.ValidationMessageFor(model => model.Employee_Name)
</div>
</fieldset>
<fieldset>
<legend>Employee Job Assignment</legend>
<div class="editor-label">
@Html.LabelFor(model => model.Client_Name)
</div>
<div class="editor-field">
@*@Html.EditorFor(model => model.Client_Name)*@
@Html.ValidationMessageFor(model => model.Client_Name)
@using (Html.BeginForm())
{
@Html.DropDownList("ClientName", ViewData["ClientName"] as List<SelectListItem>, new { @onchange = "Call_Client_Changefunc(this.value," + ViewData["Employee_ID"] + ")" })
}
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Component_Name)
</div>
<div class="editor-field">
@*@Html.EditorFor(model => model.Component_Name)*@
@Html.ValidationMessageFor(model => model.Component_Name)
@using (Html.BeginForm())
{
@Html.DropDownList("Component_Name", ViewData["Component_Name"] as List<SelectListItem>, new { @onchange = "Call_Component_Changefunc(this.value," + ViewData["Employee_ID"] + ")" })
}
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Module_Name)
</div>
<div class="editor-field">
@Html.ValidationMessageFor(model => model.Module_Name)
@using (Html.BeginForm())
{
@Html.DropDownList("Module_Name", ViewData["Module_Name"] as List<SelectListItem>)
}
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
@LabelFor(model=>model.Employee\u Name)
@Html.TextBoxFor(model=>model.Employee_Name,new{@readonly=“readonly”})
@Html.ValidationMessageFor(model=>model.Employee\u Name)
员工工作分配
@LabelFor(model=>model.Client\u Name)
@*@EditorFor(model=>model.Client\u Name)*@
@Html.ValidationMessageFor(model=>model.Client_Name)
@使用(Html.BeginForm())
{
@Html.DropDownList(“ClientName”,ViewData[“ClientName”]作为列表,新的{@onchange=“Call\u Client\u Changefunc(this.value,“+ViewData[“Employee\u ID”]+”)
}
@LabelFor(model=>model.Component\u Name)
@*@EditorFor(model=>model.Component\u Name)*@
@Html.ValidationMessageFor(model=>model.Component\u Name)
@使用(Html.BeginForm())
{
@Html.DropDownList(“Component_Name”,ViewData[“Component_Name”]作为列表,新的{@onchange=“Call_Component_Changefunc(this.value,“+ViewData[“Employee_ID”]+”)
}
@LabelFor(model=>model.Module_Name)
@Html.ValidationMessageFor(model=>model.Module_Name)
@使用(Html.BeginForm())
{
@Html.DropDownList(“模块名称”,ViewData[“模块名称”]作为列表)
}
从上面看,它只显示
ClientName
和Employee\u ID
为什么有人能帮我