If you try this, please remember:

  1. Always back up your web site first.  A Dynamic Web Template has the potential of making changes that will be very difficult to UnDo, so PLEASE never disregard this rule.

  2. Never try to remove and then reattach a template.  It will most likely not work right.  After you make changes to your Dynamic Web Template, just Update your pages instead of deleting and adding the Template.

It is fairly easy to add AdSense code to a Dynamic Web Template (DWT) in Microsoft Expression Web, but it is not documented that well.

In my case, my dynamic web template had two tables.
The first table contained one cell and it contained the header information.

The second table was right below the first and contained one row with 3 columns. 

The first cell contained the Left Header information, the second cell was a spacer to provide space between my Left Header and my content, and the third cell was my editable region.

I wanted to put all of my AdSense code in a cell along the right side.
I added two columns to the second table.

I made Coumn 4, my first new column, about 24 pixels wide.
Column 5, my second new column was to contain my AdSense code. 

I had chosen a 160 x 600 Wide Skyscraper in my Adsense Code, so I made column 5 to be 160 pixels wide.

Next, when you are in Design View type something like "xxxxx" in column 5 of the second table.  This text will be a placeholder.

Then switch to code view.  Paste your AdSense code immediately before the first character in "xxxxx".  Then delete the "xxxxx" placeholder code.  If you switch back to design view, the cell will look completely empty.  However after you update all your pages to this new template, they should all show Google ads.



Valid XHTML 1.0 Transitional        Valid CSS!