当我打开我的网站时,它会显示在兼容性视图中。但我不希望我的网站以兼容性视图打开。我检查了一些解决方案,但它们不起作用。有谁知道我哪里出错了?
我的代码是
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Admin Login</title>
<link rel="Stylesheet" type="text/css" href="<%= Url.MunroContent("~/Content/LoginCSS/style.css")%>" />
<script src="<%=Url.MunroContent("~/Scripts/jquery-1.7.1.min.js")%>" type="text/javascript"></script>
<script src="<%=Url.MunroContent("~/Scripts/jquery-ui-latest.js")%>" type="text/javascript"></script>
<script src="<%=Url.MunroContent("~/Scripts/tabbedpanel.js")%>" type="text/javascript"></script>
<script src="<%=Url.MunroContent("~/Scripts/jquery.unobtrusive-ajax.min.js")%>" type="text/javascript"></script>
<script src="<%=Url.MunroContent("~/Scripts/cross_browsers.js")%>" type="text/javascript"></script>
/head>
<body>
<div id="wrapper">
<div class="header">
</div>
<div class="munrologo">
<a href="#">
<img src="<%= Url.Content("../../Content/Images/munro_logo.jpg") %>" alt="logo" /></a></div>
<div class="loginBox">
<div class="login">
<%using (Html.BeginForm("Login", "Login", FormMethod.Post))%>
<% { %>
<div class="singleline error-line">
<label id="labelMessage" style="color: #FF0000;">
<%: TempData["LoginErrorMessage"] %></label>
</div>
<div class="singleline">
<label>
User name:</label>
<input type="text" id="username" name="username" maxlength="23" />
<span id="UserNameMessgae" style="display: none">
<label style="color: #FF0000;">
Please enter user name</label></span>
</div>
<div class="singleline">
<label>
Password:</label>
<input type="password" id="password" name="password" maxlength="23" />
<span id="UserPasswordMessage" style="display: none">
<label style="color: #FF0000;">
Please enter password</label></span>
</div>
<div class="singleline">
<br />
<button type="button" onclick="ForgotPassword()" class="forgotpassword-btn" value="Login"
tabindex="-1">
Forgot password?</button>
<input name="image" id="btnLogin" type="submit" onclick="return ValidateLogin();"
class="btnlogin" value="Login" style="display: none" />
</div>
<div class="singleline error-line">
<noscript>
<div>
You must enable java script to continue.
</div>
</noscript>
<% if (Request.Browser.Cookies)
{
if (Request.IsSupportedBrowser())
{ %>
<script type="text/javascript">
$('#btnLogin').show();
</script>
<% }
else
{
%>
Your browser / version is not supported. Supported browsers are IE 8.0 and above,
Firefox 15.0 and above, Chrome 20.0 and above, Safari 5.1 and above.
<%
}
}
else
{%>
Please enable cookie to continue with login.
<%} %>
</div>
</div>
<% }%>
</div>
<div id="clearfooter">
</div>
<!-- end #clearfooter -->
</div>
<div id="footer">
©2011 munro.com
<!-- #footer sits outside the #wrapper -->
</div>
<!-- end #footer -->
</body>
</html>
我正在使用 MVC3。