Microsoft KB Archive/168421

= INFO: Modifying Data Form Wizard Generated ASP Pages =

Article ID: 168421

Article Last Modified on 5/2/2006

-

APPLIES TO


 * Microsoft Visual InterDev 1.0 Standard Edition

-



This article was previously published under Q168421



SUMMARY
Microsoft Visual InterDev contains wizards for the generation of sample Active Server Pages (ASP). These pages serve as an example of the capabilities of Visual InterDev and Active Server Pages. Microsoft Technical Support does not provide support for changes made to these pages.



MORE INFORMATION
Using the Data Form Wizard in Visual InterDev you can create a form based upon a data source. When completed you will have three ASP documents in the form of the following:   xxxxAction.asp xxxxForm.asp xxxxList.asp Where xxxx is the file name provided to the wizard when you select it from the File menu, New option.

Microsoft Technical Support (MTS) can help troubleshoot problems in the default code created by the Data Form wizard. If any alterations are made to the code, the code is no longer considered Wizard code. Instead it is now considered "user code," and MTS will be unable to assist in troubleshooting.

For assistance from MTS, problems will need to be isolated from Wizard code and duplicated in a simple example. MTS can help resolve issues with these simple examples.

Document Information
xxxxAction.asp:

The xxxxAction.asp file is responsible for reacting to user interaction with either the xxxxList.asp or the xxxxForm.asp files. It consists of several functions defined within the  tags at the beginning of the .asp file. When the file is called, it looks to see what button was pressed, and reacts accordingly. After performing some action, it redirects the browser to either the xxxForm.asp or the xxxxList.asp files.

xxxxForm.asp:

The xxxxForm.asp file is called initially and displays a single record from the database table or recordset. It consists of four major sections. The first section sequentially is the various VBScript functions called by the form. The most important of which is the ShowFields function which is responsible for taking a field name, and showing it in the HTML document. The second major section is an ActiveX design-time control, the Data Range Header. The data range header is followed by some more VBScript code that calls the ShowFields function for each field in the recordset. Finally another ActiveX design-time control is used. This is the Data Range Footer. This simply acts as the end of a loop established by the Data Range Header.

xxxxList.asp:

The xxxxList.asp file is very similar to the xxxxForm.asp file. It contains the same sections in the same order with one exception. This file displays multiple records at a time in a list format within an HTML table. Before the Data Range header Design-time control is the  tag and the column headings.

