Hi,
I am using Mutliview control, and want to move a user control from one view to another view based on user selection. I can do this by placing a "Placeholder" control in each views. Based on the user selection, remove the control from the placeholder and add to annother placeholder as:
Me.divViewHome.Controls.Remove(Me.DiySearchSide1)
Me.divViewResults.Controls.Add(Me.DiySearchSide1)
For the first time when moving the usercontrol to another placeholder, the viewstate of the user control is working fine. Do postback by pressing any button within the usercontrol is working fine as the viewstate of the usercontrol is still maintain. But if clicking any controls that are not in the "user control" which caused postback, then the viewstate of the controls within the user control are lost. After trying around, i am suspecting moving the user control to different placeholder caused the viewstate can't be maintained...
1. Any idea why this happen?
2. Or, is there any simple way to move the user control from one View to another View dynamically, but still maintain the viewstate?
Thanks & Regards,
Edward