What exactly do you mean? If the user Control is declared on the page (in
the ASPX file) then it's automatically "reloaded" upon postback. If it's
dynamically added, then you'll have to recreate it yourself manually upon
postback. Here's a sample I posted a while back (it doesn't do user controls,
but they should work just the same):
I use some user controls to customise page layout...There are two user
controls that check if the user is authenticated or not and display data
based on this.
My problem is that if I call FormsAuthentication.SignOut() it causes
post-back, but other user controls on the page don't detect that the user is
logged-off.
It's because during the postback to log out you're still authenticated. I'd
suggest doing a Response.Redirect(Request.Path) in your event handler when
you detect they want to logout. It isn't pretty, but it works.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.