Post-back and user controls

  • Thread starter Thread starter James T.
  • Start date Start date
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.

James
 
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.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Back
Top