modal popup using window

3 posts, 0 answers
  1. drpcken
    drpcken avatar
    36 posts
    Member since:
    Feb 2007

    Posted 12 Apr 2009 Link to this post

    I love the telerik controls.  I've gotten pretty proficient with the grid and other controls, but I want to make a nice login page.  There are two types of people that could possibly login: managers and employees.  When they visit the main page of the site, they'll click a link for either manager or employee depending on which one they are.  I'd like for a modal type window to popup and process the login depending on which link they click.

    Manager authentication is stored in one table, employee in another.  If they click the Manger link I want to run manager authentication, and if they click on the employee link I want to process employee authentication.  I can handle the loggin in part but I would like a nice modal style window to popup when they click either link, and process the proper login.  How can I pass the link clicked into a modal window, then show it?

    Thanks!
  2. drpcken
    drpcken avatar
    36 posts
    Member since:
    Feb 2007

    Posted 12 Apr 2009 Link to this post

    Ok I've figured out quite a bit on my own.  I have a window that pops up with a form.  What I need to do is when the submit button is clicked and authentication is successful, to close the rad window and show the parent page, then redirect to the page after login.

    If authentication is unsuccessfull I want to show some type of notification in the radwindow.

    Thanks!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Apr 2009 Link to this post

    Hi drpcken,

    Are you using an asp:login control? If you do, please note that asp:login by design will redirect the user upon successful login to another page that is defined in the web.config or with the DestinationPageURL property. If none of these settings is configured, it actualy loads the same page again. More information on the subject is available in MSDN and other resources like this one for example.
    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. Since I assume you don't want that, I suggest 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 information helps. If your scenario differs, please open a support ticket and send me a small sample project that shows your implementation. I will rework it for you so it uses RadWindow.


    All the best,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top