Wacky Display After Editing with Expression Web

Did you just make an edit to a page on your templated website and nearly faint when you saw the end result?

A strange header display in Internet Explorer is a tell-tale sign of Expression Web inserting unnecessary code into your page’s header. The good news is that it’s a quick and easy fix.

  1. Open the HTML code using a text editor.
  2. Delete the extra garbage (shown in red below) Expression Web just inserted at the top of your file.

Voila! Back to normal.


<%@ CODEPAGE=65001 %>
<!– #include virtual=”/[your-directory-name]/template/data.asp” –>
<style type=”text/css”>
.auto-style1 {
text-decoration: underline;
pageTitle = “Program Overview” ‘Title used in title tag …

View screenshot of bad code.


<%@ CODEPAGE=65001 %>
<!– #include virtual=”/[your-directory-name]/template/data.asp” –>
pageTitle = “Program Overview” ‘Title used in title tag …

View screenshot of good code.

Why does this happen?

We think this happens because Microsoft Expression Web wants a <head> in the HTML file. It doesn’t “know” that the template code is pulling an include file which contains the page’s <head>, so it makes one itself. To make this even more strange, Expression Web doesn’t do this every time you save. Only when it feels like it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>