title: GeneralLink in Sitecore
body: <p>I'm new to Sitecore.. I have created a Page template and add a field for a URL of type General Link. I have created another field for the text for the link (this is standard practice in this project).</p>
  
  <p>I simply want to display the link in my user control but I just cant get it to work. This should be simple but Im going round in circles</p>
  
  <p>Here's an example of the code I've tried ..</p>
  
  <p>ascx :</p>
  
  <pre><code>&lt;asp:HyperLink runat="server" ID="lnkMain"&gt;&lt;/asp:HyperLink&gt;
  </code></pre>
  
  <p>ascx.cs:</p>
  
  <pre><code>lnkMain.NavigateUrl = SiteCore.Context.Item.GetGeneralLink("Link1");
  lnkMain.Text = item.GetFieldValue("Link1Text");
  </code></pre>