Login Form using Window

3 posts, 0 answers
  1. Zachery
    Zachery avatar
    3 posts
    Member since:
    May 2017

    Posted 04 Feb 2018 Link to this post

    I'm currently using Window as a pop-up login form. A user will click a button on a RadToolbar called "login". The login button is tied to a codebehind event to pop a window that will let a user authenticate to the app. This and the authentication works fine, the user submits their creds, clocks submit and if the creds match then the window is closed.

    What I'm trying to figure out how to do is refresh the parent page. The refresh checks if the user is authenticated or now and update the toolbar by removing login and replacing it with logout.

    I've been doing some research and cant find the right way to make this work.


  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4761 posts

    Posted 06 Feb 2018 Link to this post

    Hi,

    The most straightforward approach I can suggest is to:

    1. hook to the OnClientClose event of the RadWindow: https://docs.telerik.com/devtools/aspnet-ajax/controls/window/client-side-programming/events/onclientclose.
    2. initiate a postback on the main page (optionally, by checking the data passed by the content page). You can use the standard __doPostBack() function from WebForms, or .click() a button (it may even be a hidden button) that can easily give you a postback event or even invoke a partial postback.


    Regards,

    Marin Bratanov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Zachery
    Zachery avatar
    3 posts
    Member since:
    May 2017

    Posted 06 Feb 2018 in reply to Marin Bratanov Link to this post

    Thanks Marin,

    That's what I thought. I have this partially implemented and if I manually refresh the page, it works. I'm just trying to hack out a solution for the onclientclose event.

    Thanks for confirming I was going in the right direction sir!

Back to Top