Wrong ViewState accessed by composite user control

Wrong ViewState accessed by composite user control

Post by Tihomir Trifono » Fri, 14 Mar 2003 02:00:47



I'm trying to add a control programatically in a datagrid, where the
datagrid is programatically created too. The Control si viewed normal, but I
cannot access later ViewState for it to remember its properties and to
manage Events.

When building the page : (Trace)
name : Type : Size : ViewState
       _grid_9_:_ctl0:_ctl2:_0_embedded_control_ dDropDown 578 1160

_grid_9_:_ctl0:_ctl2:_0_embedded_control_:_ctl0
System.Web.UI.WebControls.DropDownList 578 0

There is ViewState for the component, but when I try to access the ViewState
later after postback, The ViewState contains only data for another
DropDownList Control on the Page, but not the nested DropDownList in
DataGrid.

Any suggestions ?

--

Eng. Tihomir Trifonov,
Senior Developer,
Triada Soft Ltd.,
9000, Varna, Bulgaria
9 Veliko Hristov str.
tel/fax +359 52 601-000(602-000)
http://www.triada.bg ,
http://www.triada-soft.bg

 
 
 

1. Wrong Viewstate accessed with composite controls ?!?

Help !.

I'm trying to add programatically a composite user control in another
composite user control, and it's allright, but when I try to access the
ViewState collection for my nested control, I get the ViewState of another
control with the same type, but not the right control.
It's a DataGrid-like user control with nested DropDownList-like user
control. When I call the ViewState there's nohing, but when on the page is
another DropDownList-like control (not nested, but standalone), then the
nested control views it's ViewState instead of it's own.

Someone have a suggestion ?

--

Regards,
Eng. Tihomir Trifonov,
Senior Developer,
Triada Soft Ltd.,
9000, Varna, Bulgaria
9 Veliko Hristov str.
tel/fax +359 52 601-000(602-000)
http://www.triada.bg ,
http://www.triada-soft.bg

2. Terminal Server Broken: Cannot load Illegal Module

3. HOWTO: Preserve viewstate for a dynamically created child control in a composite control

4. Monitoring bandwith usage

5. ViewState access within a user control

6. How to configure Mail

7. Viewstate problem when using dynamic composite controls

8. Casio CT-640

9. Maintaining DataGrid ViewState in a Composite Server Control Please Help

10. Viewstate, composite control, posted data

11. Painting Composite Custom Controls like User Controls

12. Composite user control cannot see child controls

13. Trying to understand when to use User Controls, Custom Controls(Rendered vs Composite)