问题:新建的页面总是运行时编译不通过。
使用工具VS2010
请高手帮我看看这是什么原因。
操作如图:
代码如下:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Modes.User>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ViewPage3</title>
</head>
<body>
<% using (Html.BeginForm()) {%>
<%: Html.ValidationSummary(true) %>
<fieldset>
<legend>Fields</legend>
<div class="editor-label">
<%: Html.LabelFor(model => model.ID) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.ID) %>
<%: Html.ValidationMessageFor(model => model.ID) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(model => model.Username) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Username) %>
<%: Html.ValidationMessageFor(model => model.Username) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(model => model.Realname) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Realname) %>
<%: Html.ValidationMessageFor(model => model.Realname) %>
</div>