Developing locally in Visual Studio 2010 my page looks great. When I deploy to the development server there is extra spacing and font size differences that mess things up.
Maybe it is because locally the Visual Studio rendering engine is iis7 v开发者_高级运维s on the development sever it is iis6.
How do I resolve this?
Thanks!!
Mark
You mean pages look different when viewed from the same browser? The only thing I can imagine is that you're missing some files (like CSS) when deploying.
That's probably got something to do with the IE Compatibility settings.
When you browse an intranet site; IE, by default, displays it in Compatibility View. So you may want to browse your application from different locations (local, internet, intranet) and check IE -> Tools -> Compatibility View Settings for the option "Display Intranet sites in Compatibility View". Turn it off and refresh to see if it works.
IIS got nothing to do with the page look and visual design.
You're probably viewing the page via the internal Visual Studio browser - don't do that.
Instead, right click the page and choose "View in browser" to open it with "real" browser like IE, FF or Chrome.
Try placing the link tag that references your css file out of your master page's contentPlaceHolder with id head as shown below,
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Title1</title>
<link href="~/css/layout.css" type="text/css" rel="stylesheet" media="all" runat="server" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
</body>
</html>
This fixed my issues while running through iis..
精彩评论