E
Elad Frid
Hi
I'm creating an asp net application with dynamic controls,
I have a dynamic tabstrip and multipage and each page is filed with
several controls types based on SQl database.( The code that create
them in in the Page_Init )
The problem - When I first load the page everything works OK and when
the page is post back all other controls are created again as I want
but
I get duplicated tabs that are not connected to any page.
While drPage.Read()
' Add new TAB to TabStrip
NewTab = New Microsoft.Web.UI.WebControls.Tab()
NewTab.Text = drPage("SectionName")
tsKR.Items.Add(NewTab)
' Add new Separator to TabStrip
NewSeparator = New
Microsoft.Web.UI.WebControls.TabSeparator()
tsKR.Items.Add(NewSeparator)
' Add new Page to MultiPage
NewPageView = New Microsoft.Web.UI.WebControls.PageView()
mpKR.Controls.Add(NewPageView)
' Add panel to page
Dim Panel = New Panel()
Panel.ID = "Panel" & drPage("SectionName")
Panel.Style("Top") = "100px"
Panel.Style("Hight") = "1000px"
NewPageView.Controls.Add(Panel)
Create controls....
End While
Elad.
I'm creating an asp net application with dynamic controls,
I have a dynamic tabstrip and multipage and each page is filed with
several controls types based on SQl database.( The code that create
them in in the Page_Init )
The problem - When I first load the page everything works OK and when
the page is post back all other controls are created again as I want
but
I get duplicated tabs that are not connected to any page.
While drPage.Read()
' Add new TAB to TabStrip
NewTab = New Microsoft.Web.UI.WebControls.Tab()
NewTab.Text = drPage("SectionName")
tsKR.Items.Add(NewTab)
' Add new Separator to TabStrip
NewSeparator = New
Microsoft.Web.UI.WebControls.TabSeparator()
tsKR.Items.Add(NewSeparator)
' Add new Page to MultiPage
NewPageView = New Microsoft.Web.UI.WebControls.PageView()
mpKR.Controls.Add(NewPageView)
' Add panel to page
Dim Panel = New Panel()
Panel.ID = "Panel" & drPage("SectionName")
Panel.Style("Top") = "100px"
Panel.Style("Hight") = "1000px"
NewPageView.Controls.Add(Panel)
Create controls....
End While
Elad.