load controls back after postback event
-
Hi, I was wondering how to load, for example a coupled of check boxes with their properties back on the panel after a post back event has occurred. The check boxes are dynamically added to the web form like this: [code] Dim checkbox As New CheckBox() checkbox.Text = textbox.Text checkbox.Checked = False checkbox.Visible = True panel.Controls.Add(checkbox) [/code] Thanks in advance!
-
Hi, I was wondering how to load, for example a coupled of check boxes with their properties back on the panel after a post back event has occurred. The check boxes are dynamically added to the web form like this: [code] Dim checkbox As New CheckBox() checkbox.Text = textbox.Text checkbox.Checked = False checkbox.Visible = True panel.Controls.Add(checkbox) [/code] Thanks in advance!
Your controls need to be added prior to page load, in order for them to have viewstate.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )