No results

Jul 25, 2011 at 6:15 AM

if there are no results, the headers still render. How can I present a "No Results" message instead when there are no results?

Aug 9, 2011 at 10:37 AM

Add the following template to your XSLT. Remove the <table> and </table> tags from the "dvt_1" template.

<xsl:template match="/" xmlns:asp="" xmlns:__designer="" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:XsltExtension="urn:xsltExtension-XsltExtension">
  <table border="0" width="100%" cellpadding="4" cellspacing="2" id="ResultsTable" align="right">
    <xsl:when test="/All_Results/NumberOfResults &gt; 0">
     <xsl:call-template name="dvt_1"/>
      <td>No results found.</td>