title: ASP.NET Button with Bootstrap Glyphicon
body: <p>I'm attempting to use glyphicons as icons for ASP <code>Button</code>. </p>
  
  <p>I know you can easily do this by giving the <code>&lt;i&gt;</code> element the proper <code>glyphicon</code> CSS, and then parent it under the desired button.</p>
  
  <p>However, I want to do this from the C# side NOT HTML. How do I do this?</p>
  
  <p>I tried the following, to no avail:</p>
  
  <pre><code>HtmlGenericControl i1 = new HtmlGenericControl("i");
  i1.Attributes["class"] = "glyphicon glyphicon-backward";
  i1.Attributes["aria-hidden"] = "true";
  
  Button btnFirst = new Button();
  btnFirst.ID = "btnFirst";
  btnFirst.CommandName = "FirstPage";
  btnFirst.CssClass = "btn btn-default pageButton";
  btnFirst.Click += new EventHandler(btnFirst_Click);
  btnFirst.Controls.Add(i1);
  container.Controls.Add(btnFirst);
  </code></pre>
  
  <p>If I run this as above, the button is shown, but there is no icon. 
  In the HTML, there is no <code>&lt;i&gt;</code> element nested beneath the button. In fact, it appears to no exist.</p>