This is a migrated thread and some comments may be shown as answers.

Close window after logged in (asp.net built in Login control)

1 Answer 74 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kenny
Top achievements
Rank 1
Kenny asked on 21 Mar 2009, 01:09 AM
Hi all,
Can anyone show me how to close the Login window (using radWindow of course) after a successful login? I'm using the built-in .net membership provider/login.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 23 Mar 2009, 01:54 PM
Hello Kenny,

I assume that you are using the asp:login control. If this is so, please note that its default behavior is to redirect the page once the user has logged in.

Since the login control redirects the page, it will be shown in the RadWindow itself - our control is basically an IFRAME and behaves just like one. What we suggest in such scenario is to put the following script in the page to which you intend to redirect your users after successful login:

if (window != window.top) window.top.location.href = window.location.href; 

The logic behind it is simple - if this page is not displayed as a topmost page (e.g directly in the browser) but in some container (like IFRAME / RadWindow /etc.), load it as topmost page.

I hope this helps.

Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Kenny
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or