Bind method - provide format string as constant
<p>When binding values to controls I have plenty of this:</p>

<pre><code>Text='&lt;%# Bind("StartDate", "{0:dd.MM.yyyy}") %&gt;'
</code></pre>

<p>However I would like to extract this format (and few others) to helper. And this is what I did:</p>

<pre><code>public static class DateTimeExtension
{
    public const string CalendarDateFormat = "{0:dd.MM.yyyy}";
    public const string CalendarMonthFormat = "{0:MM.yyyy}";

    public static string ToCalendarDate(this DateTime dateToFormat)
    {
        return string.Format(CalendarDateFormat, dateToFormat);
    }

    public static string ToCalendarMonthDate(this DateTime dateToFormat)
    {
        return string.Format(CalendarMonthFormat, dateToFormat);
    }
}
</code></pre>

<p>Yet now, when I change my Bind call to something like this:</p>

<pre><code>Text='&lt;%# Bind("StartDate", DateTimeExtension.CalendarDateFormat) %&gt;'
</code></pre>

<p>I get an exception:</p>

<pre><code>System.Web.HttpException: A call to Bind was not well formatted.  Please refer to documentation for the correct parameters to Bind.
</code></pre>

<p>I have namespaces configured in web.config so that shouldn't be an issue. Is there a way to achieve what I like?</p>
