title: How to use sharepoint:lookupfield control in a custom aspx page
body: <p>I've searched four several hours and came up empty.
  Hopefully someone can provide me with some example code.</p>
  
  <p>I'm making a custom page in sharepoint, displaying/editing data about an entry in the document list named "Documents". The document's content type has a custom column of type Lookup. The Lookup is done in the list named "Case", referring the column named "Title"</p>
  
  <p>I am trying to use the SharePoint:LookupField component in the following way in my .aspx file:</p>
  
  <pre><code>&lt;SharePoint:LookupField ID="lookupCase" runat="server" ControlMode="New"&gt;&lt;/SharePoint:LookupField&gt;
  </code></pre>
  
  <p>In my code behind, I have the following:</p>
  
  <pre><code>lookupCase.ListId = SPContext.Current.Web.Lists["Case"].ID;
  lookupCase.FieldName = SPContext.Current.Web.Lists["Case"].Fields.TryGetFieldByStaticName("Title").InternalName;
  </code></pre>
  
  <p>but nothing renders.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance,
   Wouter</p>