Microsoft small business knowledge base

Article ID: 830984 - Last Review: January 17, 2015 - Revision: 4.0

This article has been archived. It is offered "as is" and will no longer be updated.

On This Page


In Microsoft Expression Web, in Microsoft Office SharePoint Designer, or in Microsoft Office FrontPage 2003, you attach a Dynamic Web Template (.dwt) to an Active Server Page (.asp) that contains code. For example, the code creates a connection to a database. When you do this, the code may be deleted.


This behavior occurs if you attach a Dynamic Web Template (.dwt) to an Active Server page (.asp). When you attach a DWT file to an ASP page, everything outside the HTML tags and several items outside the BODY tags of your Web page are deleted.


To work around this behavior, use one of the following methods.

Method 1

Switch to the HTML view, and then move your ASP code into the BODY section of the HTML document. When the DWT is applied, your code will be preserved.

Method 2

Remove the code from your ASP page, and then attach your DWT file. After the DWT has been applied, switch to the HTML view, and then paste your ASP code inside one of the manageable regions.

Applies to
  • Microsoft Office SharePoint Designer 2007
  • Microsoft Expression Web
kbnosurvey kbarchive kbtemplate kbasp kbprb KB830984
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support