Custom function shared by many aspx pages
<p>I have a few aspx pages which displays GridView controls. In each control I use custom functions to format displayed data. I want to put those functions in one static class. I did like this:</p>

<pre><code>namespace MyNS
{
    public static class FormatFunctions
    {
        public static string Format1(string text)
        {
            return &lt;formatted string&gt;;
        }

        public static string Format2(string text)
        {
            return &lt;formatted string&gt;;
        }
    }
}
</code></pre>

<p>I can call those functions from codebehind file, but when I call them from aspx file like this:</p>

<pre><code>&lt;asp:TemplateField&gt;
    &lt;ItemTemplate&gt;
        &lt;%# FormatFunctions.Format1(Eval("field_name")) %&gt;
    &lt;/ItemTemplate&gt;
&lt;/asp:TemplateField&gt;
</code></pre>

<p>I got the following error:</p>

<pre><code>The name 'FormatFunctions' does not exist in the current context
</code></pre>

<p>How can I access those functions from aspx file. Should I add some headers to the aspx file?</p>
