Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Code in Active Server Page is deleted when you attach a DWT template in FrontPage 2003


View products that this article applies to.

Symptoms

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.

↑ Back to the top


Cause

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.

↑ Back to the top


Workaround

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.

↑ Back to the top


Keywords: KB830984, kbprb, kbasp, kbtemplate

↑ Back to the top

Article Info
Article ID : 830984
Revision : 5
Created on : 6/13/2007
Published on : 6/13/2007
Exists online : False
Views : 454