user390480
user390480

Reputation: 1665

ASP.NET pages look different locally vs on server

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 vs on the development sever it is iis6.

How do I resolve this?

Thanks!!

Mark

Upvotes: 0

Views: 2411

Answers (4)

Shadow Wizard
Shadow Wizard

Reputation: 66389

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.

Upvotes: 1

Harun
Harun

Reputation: 5179

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..

Upvotes: 0

Yiğit Yener
Yiğit Yener

Reputation: 5986

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.

Upvotes: 3

Anton Gogolev
Anton Gogolev

Reputation: 115751

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.

Upvotes: 3

Related Questions