title: ASP.net basic help with ASCX user control
body: <p>Trying to build my own user control:</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeFile="TabMenu.ascx.cs" Inherits="TabMenu" %&gt;
  
  &lt;asp:Panel runat="server" CssClass="tabWrapper"&gt;
          &lt;div class="tab tabSelected"&gt;&lt;a href="artworkHome.aspx"&gt;Home&lt;/a&gt;&lt;/div&gt;
          &lt;div class="tab"&gt;&lt;a href="#"&gt;Create New&lt;/a&gt;&lt;/div&gt;
          &lt;div class="tab"&gt;&lt;a href="#"&gt;Help!&lt;/a&gt;&lt;/div&gt;
          &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;asp:Literal runat="server" ID="lol"&gt;&lt;/asp:Literal&gt;
  &lt;/asp:Panel&gt;
  
  using System;
  using System.Collections.Generic;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  public partial class TabMenu : System.Web.UI.UserControl
  {
      public string TabGroup { get; set; }
  
      protected void Page_Load(object sender, EventArgs e)
      {
  
          if (this.TabGroup == "Artwork")
          {
              lol.Text = "LOL!";
          }
  
      }
  }
  </code></pre>
  
  <p>This shows fine when used as such:</p>
  
  <pre><code>&lt;CrystalControls:TabMenu runat="server" TabGroup="Artwork" /&gt;
  </code></pre>
  
  <p>Except that "LOL!" isn't showing.  I'm probably using properties incorrectly etc, I hope it's clear what I'm trying to do?</p>