Why I get error: are you missing a using directive or an assembly reference? : <p>I added C# code  in <code>aspx</code> file, but it is showing error.</p>

<p>This code I add to asp file:</p>

<pre><code>   [System.Web.Services.WebMethodAttribute, System.Web.Script.Services.ScriptMethodAttribute]
   public static string[] GetCompletionList(string prefixText, int count)
   {
        string[] names = {"Ram","Ankit","Sam","Sahil","Rajan","Rahul","Sajan"};
        var namesList = from tmp in names where tmp.ToLower().StartWith(prefixText) select tmp;

    return names;
    }
</code></pre>

<p>I get this error:</p>

<pre><code>Compiler Error Message: CS1061: 'string' does not contain a definition for 'StartWith' and no extension method 'StartWith' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
</code></pre>

<p>Here is n declared in  my page:</p>

<pre><code>&lt;%@ Import Namespace="System" %&gt;
&lt;%@ Import Namespace="System.IO" %&gt;
&lt;%@ Import Namespace="System.Collections" %&gt;
&lt;%@ Import Namespace="System.Collections.Specialized" %&gt;
&lt;%@ Import Namespace="System.Runtime.Serialization" %&gt;
&lt;%@ Import Namespace="System.Text" %&gt;
</code></pre>

<p>Any idea how can I fix the error?</p>
