Microsoft KB Archive/191969

= PRB: Form Does Not Work When Using DTCs with Nested  Tags =

Article ID: 191969

Article Last Modified on 3/7/2005

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q191969



SYMPTOMS
When you manually add  tags to an Active Server Pages (ASP) page, then drag and drop a text box DTC (or any other form-related DTC) on your page, and enable the Scripting Object Model, your form does not return any values.



CAUSE
The following dialog box appears when you drag and drop a textbox DTC (or any other form related design-time control (DTC) onto an Active Server Pages (ASP) page:

The design-time control requires the Visual InterDev Scripting Object Model. Would you like to enable the Scripting Object Model for this page?

Yes No Help

When you select Yes it will automatically add the following two script blocks to your Active Server Pages (ASP) page (marked with dark gray background in Visual InterDev): <% ' VI 6.0 Scripting Object Model Enabled %> <% if StartPageProcessing Then Response.End %> 

<% ' VI 6.0 Scripting Object Model Enabled %> <% EndPageProcessing %>  The first script block gets added between the <%@ Language=VBScript %> and  tags, the second script block gets added between the  and  tags.

When enabled, the Scripting Object Model wraps the entire page in an HTML form. Which means if you add (or have already added) a form to the page, your Web browser will ignore the nested form and any data within it.

NOTE: Nested forms are not valid HTML, and therefore the form isn't processed properly when previewing it.



RESOLUTION
Remove the form tags on the page that are not used by the Scripting Object Model.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Create a new ASP page and add the </FORM> tags manually.</li> <li>Drag and drop a DTC Textbox on to the page and name it Textbox1.</li> <li>When presented with the dialog box asking if you would like to enable the Scripting Object Model, choose Yes.</li> <li> Add the following code to the page: <%function Textbox1_onchange Response.Write Textbox1.value end function%> </li> <li>Preview the page, then enter data into the textbox and commit it.</li></ol>

Result: Nothing gets returned.

Keywords: kbprb kbctrl KB191969

-

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

© Microsoft Corporation. All rights reserved.