title: TabIndex for two control contained with a table cell ASP.Net
body: <p>I have a weird issue that I am being asked to fix but alas I have thus far drawn a blank. As the title suggests I am trying to get the tab order for two text boxes to follow one after the other.</p>
  
  <p>The idea is (and this is inherited code rather than that of my own design) that a routine is call that builds atable cell inserting two text boxes and one  link. This is then returned and foreach line in the table a new copy of this cell is generated. </p>
  
  <p>I have tried setting the TabIndex for the text boxes and find that when I tab I only get as far as the first box (txtPound) and never the second (txtPence).</p>
  
  <p>I can't decide if the issue is due to trying to do this in a TableCell or whether its something else completely.</p>
  
  <p>Hopefully that's clear but should you require any further info then I will try to supply it.</p>
  
  <p>I have included a striped down version of the code below, essentially this gets added to a table row in a the aspx pace.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <pre><code> private TableCell EstimateInputs(Brief item)
          {
      TableCell td = new TableCell();        
  
                  TextBox txtPounds = new TextBox();
  
                  string[] agencyCosts;                  
                  txtPounds.TabIndex = 1;
                  td.Controls.Add(txtPounds);
  
                  //td.Controls.Add(new LiteralControl("&lt;span&gt;.&lt;/span&gt;"));
  
                  TextBox txtPence = new TextBox();
                                  txtPence.MaxLength = 2;
  
  
                  txtPence.TabIndex = 2;
                  td.Controls.Add(txtPence);
  
                  td.Controls.Add(new LiteralControl("&lt;/p&gt;&lt;/fieldset&gt;"));
          }
  </code></pre>