Listing 22.4 shows an example of a DFWP in code view. The main tag to take note of is the
<DataSources> tag, which includes the
SPDataSource control and
DataSourceMode parameter. The
<SPDataSource> tag is important when working with DFWPs and configuring cross-list data lookups. For instance, if you want to retrieve all list items of type Announcements from within the current site collection, you can employ the
SPDataSource CrossList method. See Chapter 24 for a thorough discussion on configuring the
SPDataSource in DFWPs for cross-list data retrieval.
<WebPartPages:DataFormWebPart runat="server" IsIncluded="True" AsyncRefresh="false"FrameType="None" NoDefaultStyle="TRUE" ViewFlag="8" ...