我有两页两页。 第一页
@model IncidentsDB.UI.Web.ViewModels.Account.LogOnModel
@{
ViewBag.Title = "Вход в систему";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="headerLabel">
<h3>Вход в систему</h3>
</div>
@using (Html.BeginForm("Register", "Account", FormMethod.Get, new { id = "searchForm" }))
{
<div class="createUserDiv">
<input type="submit" class="lightGreenGradientBtn" id="createUserBtn" value="Добавить нового пользователя" />
</div>
}
@using (Html.BeginForm()) {
<div class="loginDataDiv">
<div class="leftItemDiv labelDiv" style="padding-left: 45px">
@Html.LabelFor(m => m.UserName)
</div>
<div class="editor-field rightItemDiv">
@Html.TextBoxFor(m => m.UserName)
</div>
<div class="loginErrorDiv labelDiv">
@Html.ValidationMessageFor(m => m.UserName)
</div>
<div class="leftItemDiv labelDiv" style="padding-left: 45px">
@Html.LabelFor(m => m.Password)
</div>
<div class="editor-field rightItemDiv noWrap">
@Html.TextBoxFor(m => m.Password)
</div>
<div class="rememberPswdDivCollapse" id="rememberPswdDiv">
@Html.ActionLink("Вспомнить пароль", "RestorePassword","Account", new { @class = "rememberPswdLink" })
</div>
<div class="loginErrorDiv">
@Html.ValidationMessageFor(m => m.Password)
</div>
<div class="clearStyles rightItemDiv">
<input type="submit" class="greenGradientBtn" id="loginBtn" value="Войти" />
</div>
</div>
}
和第二页
@model IncidentsDB.UI.Web.ViewModels.Account.LogOnModel
@{
ViewBag.Title = "Вход в систему";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
<div class="restorePswdDivVisible">
<p>
Введите адрес электронной почты, <br />
который вы указывали при регистрации:
</p>
<div class="editor-label">
@Html.LabelFor(m => m.UserName)
</div>
<div class="editor-field noWrap">
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
</div>
<div class="loginErrorDiv noWrap" style="width: 150px">
</div>
<div>
<input type="submit" class="lightGreenGradientBtn restorePswdBtn" id="restorePswdBtn" value="Восстановить" style="margin-left: 150px" />
</div>
</div>
}
我也有两页通用的模型类
namespace IncidentsDB.UI.Web.ViewModels.Account
{
public class LogOnModel
{
[Required(ErrorMessage="Укажите логин")]
[Display(Name = "NicName", ResourceType = typeof(PersonalRes))]
public string UserName { get; set; }
[Required(ErrorMessage = "Укажите пароль")]
[DataType(DataType.Password)]
[Display(Name = "Password", ResourceType = typeof(PersonalRes))]
public string Password { get; set; }
[Required(ErrorMessage = "Укажите e-mail")]
[DataType(DataType.EmailAddress)]
[Display(Name = "Email", ResourceType = typeof(PersonalRes))]
public string Email
{
get;
set;
}
[Display(Name = "Rememberme", ResourceType = typeof(PersonalRes))]
public bool RememberMe { get; set; }
}
}
所以这段代码在firefox和chrome中运行良好,但不在ie! 为什么呢?
提前感谢!