Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created)

Reply
Thread Tools

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

 
 
dickster
Guest
Posts: n/a
 
      12-08-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ViewState problem: When Composite Control Inside Custom GridView Amit ASP .Net Building Controls 0 03-07-2008 05:25 AM
Composite Web Control and Dynamically Created Children Controls. Craig ASP .Net Building Controls 9 03-29-2005 12:11 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
ViewState of the Composite Control composed of custom control whoisnidhee ASP .Net Web Controls 2 07-16-2004 08:05 AM



Advertisments