Microsoft KB Archive/190939

= FIX: Problems When You Use FrontPage 98 to Edit ASP Pages =

Article ID: 190939

Article Last Modified on 3/7/2005

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q190939



SYMPTOMS
If you create an Active Server Pages (ASP) page in Visual InterDev and edit it in Microsoft FrontPage 98, the ASP page appears successfully the first time that you preview it but displays errors if the page round trips to the server and back or if you link to another page through server-side code.



CAUSE
The Scripting Object Model in Visual InterDev requires some specific text at the top of the page and just after the end  tag. This text includes a  tag. However, FrontPage does not allow  tags outside of the  tags. When you save a Visual InterDev ASP page that has the Scripting Model enabled (which is required for Design-Time Control functionality) in FrontPage 98, the  tags are moved to immediately follow the initial  tag. This means that none of the Design-Time Controls (DTCs) within the  tags appear within the  tags, so any Post to the server does not recognize the DTCs.



RESOLUTION
To preserve the round trip and server-side processing of code that is related to the DTCs, do not use FrontPage 98 to edit ASP pages that depend on the Scripting Object Model.

If you have already edited a page in FrontPage 98, use the following steps to restore the functionality:  Open the page in Visual InterDev 6.0. In the properties for the page, select Enable scripting object model.</li> Read-only, grayed out text appears at the top of the page and just after the </BODY> tag.</li>  Delete the following lines from the top of the page if duplicated: <pre class="fixed_text">     <% ' VI 6.0 Scripting Object Model Enabled %> <% if StartPageProcessing Then Response.End %> </li>  Delete the <FORM> tags that follow the  tag: <pre class="fixed_text">     <form name="thisForm" METHOD="post"> </li>  Delete the following lines just after the  tag if duplicated: <pre class="fixed_text">     <% ' VI 6.0 Scripting Object Model Enabled %> <% EndPageProcessing %> </li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

<div class="moreinformation_section">

MORE INFORMATION
FrontPage 98 may also move script blocks or controls that were placed above the  tag to below the  tag. The script is generally maintained in whole blocks and therefore does not usually cause a problem.

The Scripting Object Model uses hidden elements on the client to pass information back to the server. These elements are created on the fly through the call to EndPageProcessing. This call must appear before the </FORM> tag, otherwise the hidden elements are not part of the HTML form and have no effect.

Steps to Reproduce Behavior
<ol> Create an ASP page in Visual InterDev 6.0.</li> Add a button DTC.</li> Click Yes to enable the Scripting Object Model when prompted.</li> Add a label DTC, and set the caption.</li>  Write a server-side event handler for the button to alter the label caption, for example: Sub Button1_onclick Label1.setCaption(Label1.getCaption & "*") End Sub </li> Save and browse the page.

NOTE: You can click the button several times, and a star is added each time.</li> Open the file in FrontPage 98 and save it.</li> Browse the page.

NOTE: The button function works the first time that you click it and fails after that.</li></ol>

Keywords: kbbug kbfix kbextension kbserver kbvs600sp3fix KB190939

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.