Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3607552
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:23:24+00:00 2026-05-18T21:23:24+00:00

Consider I have 2 controls, C and CompositeC which contains C . Both C

  • 0

Consider I have 2 controls, C and CompositeC which contains C. Both C and CompositeC have ViewState.

Now consider a third control causes a postback.

The resulting life cycle will be as follow:

  1. CompositeC tries to restore state. To do so it needs to create the child controls, so it creates C.
  2. When C is created it’s ViewState is restored.
  3. The third control’s postback event is triggered. At this time a handler calls CompositeC.RecreatedChildControls() and C is created again.
  4. Everything renders.

The problem is that C state is not restored again after step 3. RecreateChildControls method should modify the control’s state so that when C is reintroduced to the CompositeC control’s collection it’s viewstate is automatically restored but it doesn’t.

What should I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:23:25+00:00Added an answer on May 18, 2026 at 9:23 pm

    Actually I found this is by design and it makes sense. ViewState is meant to allow for state restoration after a postback. If after that I recreate my controls, it won’t take place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this scenario; suppose I have WPF window which have four objects bonded to
Lets assume I have the following 3 entities: Customer,Order,Product which interact in the View
Recently i completed on mid level web application where i have used telerik controls,
Consider the following common situation: You have some MainView in your Cocoa application, loaded
I have a configuration file that I consider to be my base configuration. I'd
I have a C++/CLI project that uses CWinFormsControl and CWinFormsView to create .NET controls
I have a question about HTTPService and the data it returns. Well lets consider
Consider the following code : class TestTimerGC : Form { public TestTimerGC() { Button
First off, I realize most of this can also be done using ItemTemplates. If
Whats the best practice for implementing a confirmation page in .Net? I've used response.redirect(Thankyou.aspx)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.