The following example illustrates the steps that are required to pass parameter information from one Data View Web Part to another Data View Web part by using Web Part Connections in FrontPage 2003:
- Create two XML files. For example, use the following sample code to create two XML files named FileOne.xml and FileTwo.xml:
FileOne.xml
===========
<root>
<node>valueOne</node>
<node>valueTwo</node>
</root>
FileTwo.xml
===========
<root>
<node>valueThree</node>
<node>valueFour</node>
</root>
- Create a document library on a Microsoft Windows SharePoint Web site. To do this, follow these steps:
- Open a Windows SharePoint Web site.
- On the top link bar, click Create.
- On the Create Page page, click Document Library.
- In the Name box, type a name for the document library. For example, type MyDocumentLibrary.
Note You cannot leave the Name box empty.
- In the Description box, type a description of the purpose of the library.
Note The description information for the document library is optional. - In the Navigation section, click Yes if you want a link to this list to appear on the Quick Launch bar.
- In the Document Versions section, click Yes if you want a backup copy of a file to be created every time that a file is checked in the document library.
- In the Document Template section, specify the type of file to be used as a template for new files in this document library.
- Click Create.
- Import both the FileOne.xml and the FileTwo.xml files that you created in step 1 to the document library. To do this, follow these steps:
- On the top link bar, click Documents and Lists.
- In the Document Libraries section, click the document library that you created in step 2.
- Click Upload Document.
- Click Browse to locate the FileOne.xml file, and then click the FileOne.xml file to specify the file name in the Name box.
- Click Save and Close.
- Repeat steps c through e for the FileTwo.xml file.
- Create two Data View Web Parts in FrontPage 2003. To do this, follow these steps:
- Start FrontPage 2003.
- Open the Windows SharePoint Web site in FrontPage 2003.
- Add a new Web page to the Windows SharePoint Web site, and rename theWeb page newpage.aspx.
- In the Folder List section, locate and then drag the document library that you created in step 2 to the new Web page to create a new Data View Web Part.
- In the Folder List section, under the document library that you created in step 2, locate and then drag the FileOne.xml file to the new Web page to create another Data View Web Part. The Data View Web Part will display the content of the FileOne.xml file in a bulleted list.
- Right-click the first Data View Web Part, and then click Web Part Connections.
- In the Choose the action on the source Web Part to use for this connection list, click Provide Data Values To, and then click Next.
- Under the Choose the page containing the Web Part for the connection section, click Connect to a WebPart on this page, and then click Next.
- In the Target Web Part list, select the name of the second Data View Web Part.
- In the Target action list, click Modify View Using Parameters From, and then click Next.
- In the adjacent cell that is left of the Input File text, click Name (for use in forms) from the list, and then click Next.
- Click Next.
- Click Finish to complete the connection.
- Save the newpage.aspx Web page.
- Verify the connection between the Data View Web Parts. To do this, follow these steps:
- Open the newpage.aspx Web page in your browser.
- In the first Data View Web Part, click FileTwo.xml to display the FileTwo.xml file contents in the second Data View Web Part.
- Repeat step b for the FileOne.xml file.