title: Eval in Usercontrol with Inherits
body: <p>I feel ashamed, im doing something wrong and i have no idea what it is.
  Somebody here to help? If so, thanks in advance!</p>
  
  <p>I am trying to read a property from the Inherited Code in the GAC from an ASP Usercontrol. The CodeBehind in the UserControl is:</p>
  
  <pre><code>namespace My.Name.Space
  {
      public class MyControl : UserControl
      {
          public String SomeString { get; set; }
          public Boolean MyProperty
          {
              get
              {
                  if (String.Equals(SomeString,"SomeValue"))
                      return true;
                  return false;
              }
          }
  
          // other code
      }
  }
  </code></pre>
  
  <p>The ascx looks like this:</p>
  
  <pre><code>&lt;%@ Control ClassName="MyControl" Language="C#" Inherits="My.Name.Space.MyControl, MyDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxx" %&gt;
  &lt;asp:DropDownList runat="server" id="myId" Visible='&lt;%# Eval("MyProperty") %&gt;' /&gt;
  </code></pre>
  
  <p>The Control is hard wired into an Aspx Page but the SomeString Property aint set in the aspx!
  the SomeString Property is set in the OnLoad of the Aspx Page.</p>
  
  <p>Any Idea whats wrong with my Code?
  Thank again!</p>
  
  <p><strong>edit:</strong> i also tried <code>&lt;asp:Label Text='&lt;% Eval("MyProperty") %&gt;' /&gt;</code>, same Error (An unexpected error has occurred. )</p>