Convert bool? to Yes/No/null string
<p>i have an object that as a parameter bool?</p>

<p>i need to show it on a repeater.</p>

<pre><code>&lt;%# Eval("LS_Body_Connection") %&gt;
</code></pre>

<p>i create a class </p>

<pre><code>public static class BooleanExtensions
{
    public static string ToYesNoString(this bool value)
    {
        return value ? Resources.Yes : Resources.No;
    }
}
</code></pre>

<p>how to use it on the repeater?</p>

<p>i try </p>

<pre><code>((bool)Eval("LS_Body_Connection")).ToYesNoString()
</code></pre>

<p>but it's not recognaize</p>

<p>'bool' does not contain a definition for 'ToYesNoString' and no extension method 'ToYesNoString' accepting a first argument of type 'bool' could be found (are you missing a using directive or an assembly reference?)</p>

<p>in the cs of the page i can call the extension method</p>

<p>when i add </p>

<pre><code>&lt;%@ Import Namespace="IDD.App_Code" %&gt;
</code></pre>

<p>i get
     The call is ambiguous between the following methods or properties: 'IDD.App_Code.BooleanExtensions.ToYesNoString(bool?)' and 'IDD.App_Code.BooleanExtensions.ToYesNoString(bool?)'</p>
