0

I have a .NET 3.5 website that we work on in Visual Studio 2010. The problem is that when we publish the website and put the files to the web server with IIS7, the display is different than what is shown when we run locally. The problem happens on all of our supported browsers: Chrome, IE, and Firefox. The control that is displaying incorrectly is an asp menu control. While I have read many other threads regarding issues with this control, none of the solutions seem right for my specific problem.

In chrome, I used the Firebug extension to compare the html and css for the desirable and undesirable displays. I found that the css is identical while the HTML is different. The information below compares the html tags that get generated for different browsers and publishing methods.

Visual Studio 2008 publish and local (desirable):

  • Chrome: ul, li
  • IE: ul, li

Visual Studio 2010 publish (undesirable):

  • Chrome: span
  • IE: table, tr, td

Our temporary workaround is very inconvenient. When we are ready to publish, we open the website in Visual Studio 2008 and publish from there.

Another problem I have that is related: sometimes, this menu is supposed to be hidden. When I publish from 2010, it is not hidden when it should be. Desirable behavior is achieved when running locally or publishing from Visual Studio 2008.

I saw the solution here that was the closest thing I found to my problem. ASP.NET Menu rendering different from vs2008 to vs2010 The only difference here is that the asker's problem was Chrome specific while my problem extends to all browsers. Maybe this solution can be tailored to my issue?

Community
  • 1
  • 1
faedra
  • 53
  • 1
  • 7

1 Answers1

0

I haven't solved this problem exactly, but do think I found the problem. I read that there is a bug with visual studio where the app browsers dll gets published in .net 4.0 even though my project is .net 3.5. A workaround is to save the file from the 2008 publish and replace the file from the 2010 publish with the 2008 version. I guess this problem will go away once we upgrade our .net version.

faedra
  • 53
  • 1
  • 7