Wrong Viewstate accessed with composite controls ?!?

Wrong Viewstate accessed with composite controls ?!?

Post by Tihomir Trifono » Fri, 14 Mar 2003 01:59:52



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

 
 
 

1. Wrong ViewState accessed by composite user control

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

2. Help A weird one

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

4. Restoring Dblspaced partition...

5. Viewstate problem when using dynamic composite controls

6. How to tell what's sending & recieving??

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

8. sendmail.cf woes

9. Viewstate, composite control, posted data

10. Accessing Composite Control values on Postback

11. How to Access ViewState/Events on Dynamically created Controls

12. ViewState access within a user control

13. Painting Composite Custom Controls like User Controls