title: C# making a tab, adding controls to the tab, and then having multiple tabs of that type
body: <pre><code>TabPage newpage = new TabPage();
  Tabs.TabPages.Add(newpage);
  newpage.Controls.Add(this.tableLayoutPanel41);
  newpage.Location = new System.Drawing.Point(4, 26);
  newpage.Name = "AddMaintAgreement" + offset;
  newpage.Size = new System.Drawing.Size(736, 523);
  newpage.TabIndex = 10;
  newpage.Text = "Add Maintenance Agreement";
  newpage.UseVisualStyleBackColor = true;
  offset++;
  </code></pre>
  
  <p>Basically thats what i have at the moment, I added the offset in there because i thought it might affect my problem.</p>
  
  <p>Basically, this code here works okay for adding one "addmaintagreement" tab. After that only the latest tab has any controls on it!</p>
  
  <p>Basically I'm stumped. Any help would be appreciated. Thanks.</p>