Model view controller MVC视图显示项目和模型名称
这将从浏览器上的程序中删除 当从开发环境项目执行MVC应用程序时,模型名称在网页上作为字符串翻译。谁能帮我解决这个问题Model view controller MVC视图显示项目和模型名称,model-view-controller,Model View Controller,这将从浏览器上的程序中删除 当从开发环境项目执行MVC应用程序时,模型名称在网页上作为字符串翻译。谁能帮我解决这个问题 @Model HWAMCCallReg.Models.DownCall() <link rel="stylesheet" href="@Url.Content("~/Contents/StyleSheet.css")" /> <link rel="stylesheet
@Model HWAMCCallReg.Models.DownCall()
<link rel="stylesheet"
href="@Url.Content("~/Contents/StyleSheet.css")" />
<link rel="stylesheet"
href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-
ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script type="text/javascript">
$(function () {
// $("input[type=text]").first().focus();
$("#Caller").focus();
});
</script>
<div class="deContainer">
<div class="moduletitle">
Add DownCall
</div>
<div class="decontrolsContainer">
@Using (Html.BeginForm("Add", "DownCall",
FormMethod.Post))
@Html.AntiForgeryToken()
@Html.ValidationSummary(True)
@<table class="degrid">
<tbody>
<tr>
<td class="callno">
<strong>Last DownCall No : @TempData("CallNo")
</strong>
</td>
</tr>
<tr>
<td>
<label class="caption"> Caller</label>
</td>
</tr>
<tr>
<td>
@Html.TextBox("Caller", Model.Caller, New With
{.class = "textbox", .tabindex = 1, .maxlength =
60})
@Html.ValidationMessage("Caller")
</td>
</tr>
<tr>
<td style="padding-top:5px;">
<label class="caption"> System No.</label>
</td>
</tr>
<tr>
<td>
@Html.DropDownList("SystemID", New
SelectList(ViewBag.SystemNo, "Value", "Text",
Model.SystemID), New With {.class = "cbo",
.tabindex = 2})
@Html.ValidationMessage("SystemID")
</td>
</tr>
<tr>
<td style="padding-top:5px;">
<label class="caption">Problem Reported</label>
</td>
</tr>
<tr>
<td>
@Html.TextArea("ProblemReported",
Model.ProblemReported.ToString, New With
{.class = "mtextbox", .tabindex = 3,
.maxlength = 600})
@Html.ValidationMessage("ProblemReported")
</td>
</tr>
</tbody>
</table>
@<div style="text-align:center;padding-top:10px; ">
<input id="btnSave" type="submit" value="Save"
name="btnSave" class="button" />
</div>
End Using
</div>
</div>
@Model HWAMCCallReg.Models.DownCall()
$(函数(){
//$(“输入[类型=文本]”).first().focus();
$(“#调用方”).focus();
});
加上下行电话
@使用(Html.BeginForm(“添加”、“下行”),
FormMethod.Post)
@Html.AntiForgeryToken()
@Html.ValidationSummary(True)
@
最后一个下行电话号码:@TempData(“CallNo”)
呼叫者
@TextBox(“调用者”,Model.Caller,新增
{.class=“textbox”,.tabindex=1,.maxlength=
60})
@Html.ValidationMessage(“调用方”)
系统编号。
@Html.DropDownList(“SystemID”),新建
选择列表(ViewBag.SystemNo,“值”、“文本”,
Model.SystemID),新增为{.class=“cbo”,
.tabindex=2})
@Html.ValidationMessage(“系统ID”)
报告的问题
@TextArea(“ProblemReported”,
Model.ProblemReported.ToString,新增,带
{.class=“mtextbox”,.tabindex=3,
.maxlength=600})
@Html.ValidationMessage(“ProblemReported”)
@
终端使用
你能发布你的查看代码吗?代码添加到原始帖子中。你能帮我解决这个问题吗?你不应该提到你的模型类型为“@model HWAMCCallReg.Models.DownCall()”而应该提到你的模型名“@model HWAMCCallReg.Models.DownCall”。我已经从模型名中删除了(),但它仍然不起作用。浏览器上的输出显示HWAMCCallReg.DownCallHWAMCCallReg.Models.downcall不仅()而且模型m也很小。。你做到了吗?请参阅上一条注释的后面代码