Post-back and user controls

J

James T.

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
 
B

Brock Allen

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.
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top