Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is

D

dickster

Ok here's my scenario.

I have a Custom Composite Server Control (CCSC) consisting of a
TextBox, Button & Panel. (And some other code - which I will explain
later)

There is a button on the webform called ADD that "adds" as many of
these (CCSC) as you want.

OK it's straight forward to manage ViewState (i.e. the text entered
in the TextBox) of these dynamically added CCSC.

I do this based on the principle on PostBack of running the code that
created "x" number of my CCSC to the Control Hierarchy in the
Page_Init().

The ViewState then does its stuff later on down the Page Execution
LifeCycle to reset the Text property of each TextBox.

However my problem is this - my CCSC, depending on the Text entered
when the button (of the CCSC) is clicked dynamically adds either a
CheckBox or RadioButton in the Panel.

How on earth do I manage ViewState of either the CheckBox or
RadioButton.

i.e. there are 2 phases of Dynamic Creation.

I can post the code if required

Dickster
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top