Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. RuntimeTabstrip Control

RuntimeTabstrip Control

Scheduled Pinned Locked Moved ASP.NET
designcsharpasp-nethelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shivarishxxxx
    wrote on last edited by
    #1

    Can we design dynamic tabstrip control at runtime without creating tabstrip control at design time? Am trying to do it by adding %@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> at asp.net design page (.aspx) and Microsoft.Web.UI.WebControls.TabStrip tabControl = new Microsoft.Web.UI.WebControls.TabStrip(); at code behind. Microsoft.Web.UI.WebControls.Tab tab=new Microsoft.Web.UI.WebControls.Tab(); tab.Text= " ok" ; tab.ID = "1" ; tabControl.Items.Add(tab); Am not getting anything on page. Can somebody help???

    rmr

    G 1 Reply Last reply
    0
    • S shivarishxxxx

      Can we design dynamic tabstrip control at runtime without creating tabstrip control at design time? Am trying to do it by adding %@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> at asp.net design page (.aspx) and Microsoft.Web.UI.WebControls.TabStrip tabControl = new Microsoft.Web.UI.WebControls.TabStrip(); at code behind. Microsoft.Web.UI.WebControls.Tab tab=new Microsoft.Web.UI.WebControls.Tab(); tab.Text= " ok" ; tab.ID = "1" ; tabControl.Items.Add(tab); Am not getting anything on page. Can somebody help???

      rmr

      G Offline
      G Offline
      g00fyman
      wrote on last edited by
      #2

      You need to add the control to the Page's Control collection Page.Controls.Add(tabControl); regs g00fy

      S 1 Reply Last reply
      0
      • G g00fyman

        You need to add the control to the Page's Control collection Page.Controls.Add(tabControl); regs g00fy

        S Offline
        S Offline
        shivarishxxxx
        wrote on last edited by
        #3

        Thanks for the reply. But am not still able to get the tabcontrol. Please help Design : <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> Code : private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here Microsoft.Web.UI.WebControls.TabStrip tabControl = new Microsoft.Web.UI.WebControls.TabStrip(); Microsoft.Web.UI.WebControls.Tab tab=new Microsoft.Web.UI.WebControls.Tab(); tab.Text= " ok" ; tab.ID = "1" ; tabControl.Items.Add(tab); Page.Controls.Add(tabControl); } -- modified at 10:20 Wednesday 6th September, 2006

        rmr

        G 1 Reply Last reply
        0
        • S shivarishxxxx

          Thanks for the reply. But am not still able to get the tabcontrol. Please help Design : <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> Code : private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here Microsoft.Web.UI.WebControls.TabStrip tabControl = new Microsoft.Web.UI.WebControls.TabStrip(); Microsoft.Web.UI.WebControls.Tab tab=new Microsoft.Web.UI.WebControls.Tab(); tab.Text= " ok" ; tab.ID = "1" ; tabControl.Items.Add(tab); Page.Controls.Add(tabControl); } -- modified at 10:20 Wednesday 6th September, 2006

          rmr

          G Offline
          G Offline
          g00fyman
          wrote on last edited by
          #4

          ok i don't have that assembly and have never used it but this code works

          protected void Page_Load(object sender, EventArgs e)
          {
          Table table = new Table();
          table.Rows.Add(new TableRow());
          table.Rows[0].Cells.Add(new TableCell());
          table.Rows[0].Cells[0].Controls.Add(new LiteralControl("cell 0"));

          Page.Controls.Add(table);
          

          }

          and this code doesn't work

          protected void Page_Load(object sender, EventArgs e)
          {
          Table table = new Table();
          table.Rows.Add(new TableRow());
          table.Rows[0].Cells.Add(new TableCell());
          table.Rows[0].Cells[0].Controls.Add(new LiteralControl("cell 0"));

          //Page.Controls.Add(table);
          

          }

          hope that helps g00fy

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups