title: Converting value of an Eval from int to string
body: <p>I have an integer stored in my database that I need to convert string.</p>
  
  <p>This is my attempt at the Eval:</p>
  
  <pre><code>&lt;%# ChangeSalaryType(Eval("SalaryType")) %&gt;
  </code></pre>
  
  <p>This is my attempt at the function:</p>
  
  <pre><code>public static string ChangeSalaryType(int salaryType)
  {
      string salaryTime = string.Empty;
  
      if (salaryType == 1)
      {
          salaryTime = "per hour";
      }
      else if (salaryType == 2)
      {
          salaryTime = "per week";
      }
      else if (salaryType == 3)
      {
          salaryTime = "per annum";
      }
      return salaryTime;
  }
  </code></pre>
  
  <p>But I am getting these errors:</p>
  
  <pre><code>Argument 1: cannot convert from 'object' to 'int'   
  Error   2   The best overloaded method match for 'controls_allPlacements.ChangeSalaryType(int)' has some invalid arguments   
  Error   4   The best overloaded method match for 'controls_allPlacements.ChangeSalaryType(int)' has some invalid arguments
  </code></pre>
  
  <p>I have used "SalaryType" in the Eval as that is the parameter that has the information from the database in. I'm not completetly sure what I am doing wrong.. </p>