By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,956 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,956 IT Pros & Developers. It's quick & easy.

user control event fires after content page page_load

P: n/a
Hi.

I have a page that has a user control as a header on it:

-------------------------------------------------------------------
| Header linkButton: logout |
-------------------------------------------------------------------
| Content page |
| |
| List of items |
| ------------- |
| Item1 |
| Item2 |
| etc... |
| |
| |
-------------------------------------------------------------------

(this user control header is to be used on all pages of my site)

As you can see from the draft above the header user control has a link to log out.
In the code behind the click event for this linkbutton calls FormsAuthenticaiton.SignOut.
My problem is that this does not redirect the user to the log in page specified in the web.config.
Instead the content page is displayed as if reloaded.
The user has to click the logout link two times(!) for him to be signed out and redirected.
I've tried to Response.Redirect to the login page from the link button click event, but as I have included the
header control on the login page as well this causes an infinite loop.

Any suggestions?
I think it would be neat if I can find a solution to this one, instead of having to re-think and re-write.

cheers,
mortb
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.