SP 2003 – Managed paths

SharePoint 2003: How to exclude paths to run ASP.NET applications
Running an ASP.NET application on a server with a SharePoint instance requires excluding the virtual paths the application needs, as the SharePoint ISAPI filter will intercept all requests. This post assumes you have SharePoint installed as a Default Web Site.

1. From the Administration Tools, click on SharePoint Central Administration.

2. Click on SharePoint Portal Server in the left menu.

3. Click on Configure virtual server settings from the Virtual Server List page.

4. Click on Default Web Site.

5. Click on Define managed paths.

6. Enter a path, check Exclude Path, and click OK.

DataFormWebPart simple example – without GUIDs

<WebPartPages:DataFormWebPart
  runat="server"
  DataSourceID="test1"
  IsIncluded="True"
  AsyncRefresh="True"
  FrameType="None"
  NoDefaultStyle="TRUE"
  ViewFlag="8"
  Title="Contacts"
  PageType="PAGE_NORMALVIEW"
  __markuptype="vsattributemarkup"
  partorder="2"
  __WebPartId="{F282332F-8BEF-4B6B-8A46-7C1E00177C4E}"
  id="g_f282332f_8bef_4b6b_8a46_7c1e00177c4e">
 
 <DataSources>
 
  <SharePoint:SPDataSource
   DataSourceMode="List"
   ID="test1"
   UseInternalName="true"
   SelectCommand="<View />"
   runat="server" >
 
<SelectParameters>
<WebPartPages:dataformparameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="Contacts" />
<WebPartPages:dataformparameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="{sitecollectionroot}" />
</SelectParameters>
 
  </SharePoint:SPDataSource>
 </DataSources>
 
<datafields>@ID,ID;@ContentType,Content Type;@Title,Last Name; SNIPPED HERE
</datafields>
 
 
  <xsl>
      <xsl:stylesheet
        xmlns:x="http://www.w3.org/2001/XMLSchema"
        xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
        version="1.0"
        exclude-result-prefixes="xsl msxsl ddwrt"
        xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
        xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
        xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt"
        xmlns:SharePoint="Microsoft.SharePoint.WebControls"
        xmlns:ddwrt2="urn:frontpage:internal"
        xmlns:o="urn:schemas-microsoft-com:office:office"> 
 
          <xsl:include href="/_layouts/xsl/main.xsl"/> 
          <xsl:include href="/_layouts/xsl/internal.xsl"/>
          <xsl:output method="xml" />
 
          <xsl:template match="/"
            xmlns:x="http://www.w3.org/2001/XMLSchema"
            xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
            xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
            xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
            xmlns:SharePoint="Microsoft.SharePoint.WebControls"
            xmlns:o="urn:schemas-microsoft-com:office:office">
              <ul class="list-arrow">
                <xsl:apply-templates select="/dsQueryResponse/Rows/Row"></xsl:apply-templates>
              </ul>
          </xsl:template>
 
          <xsl:template match="/dsQueryResponse/Rows/Row">
            <li>
              <a href="{@Title}">
                <xsl:value-of select="@Title"/>
              </a>
            </li>    
          </xsl:template>
 
      </xsl:stylesheet>
    </xsl>
 
</WebPartPages:DataFormWebPart>

SPDatasource

Stolen from Chris O’Brien
His blog

<SPWebControls:SPDataSource
	runat="server"
	ID="dsPersonTitles"
	DataSourceMode="List"
	SelectCommand="<Query><OrderBy><FieldRef Name='SortOrder' Ascending='true' /></OrderBy></Query>"
	<SelectParameters>
		<asp:Parameter Name="WebUrl" DefaultValue="/configuration/" />
		<asp:Parameter Name="ListName" DefaultValue="PersonTitles" />
	</SelectParameters>
</SPWebControls:SPDataSource>
 
<asp:DropDownList
	runat="server"
	ID="ddlPersonTitles"
	CssClass="title"
	DataSourceID="dsPersonTitles"
	DataTextField="Title"
	DataValueField="ID">
</asp:DropDownList>