Link to home
Start Free TrialLog in
Avatar of KentJackson777
KentJackson777Flag for United States of America

asked on

Microsoft.Web.UI.WebControls, MultiPage losing PageViews and ViewState contents

I am dynamically adding PageViews to a MultiPage control. With Debug I see the MultiPage PageView count increment to the correct number. When I do a Postback the MultiPage loses all the PageViews, the count going to 0.
The code is:
Dim objAppPage As New PageView
Me.mpGenApp.Controls.Add(objAppPage)

The mpGenApp is the MultiPage visible on the Web Form.

Thank you,
Kent
ASKER CERTIFIED SOLUTION
Avatar of thrill_house
thrill_house
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KentJackson777

ASKER

Both marked responses gave me the solution. I needed to re-create the PageViews AND do it in Page_Init.
Thank you both for your help