title: Custom transformation function throwing error.
body: <p>This is my transformation function call:</p>
  
  <pre><code>&lt;p&gt;&lt;%# MyFunctions.getDocumentCategory(Eval("DocumentID"))%&gt;&lt;/p&gt;
  </code></pre>
  
  <p>This is the function:</p>
  
  <pre><code>public static string getDocumentCategory(int documentID)
  {
  
      string category;
  
      StringBuilder sb = new StringBuilder();
      // Get document categories 
      var ds = CategoryInfoProvider.GetDocumentCategories(documentID, "CategoryEnabled = 1", null);
      // Check whether exists at least one category
      if (!DataHelper.DataSourceIsEmpty(ds))
      {
  
          // Loop thru all categories
          foreach (DataRow dr in ds.Tables[0].Rows)
          {
              sb.Append(Convert.ToString(dr["CategoryDisplayName"]) + ",");
          }
      }
      string content = sb.ToString();
  
      category = content.Split(',')[0];
  
      return category;
  }
  }
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>MyFunctions.getDocumentCategory(int) has some invalid arguments. 
  </code></pre>
  
  <p>I've tried an alternate form of the function that accepts strings rather than ints but it throws the same error. I've verified that the <code>Eval("DocumentID")</code> works correctly when placed by itself. Any ideas?</p>