I am using an Ajax modalpopupextender control to popup a daily inspirational quote message to the employee soon after he is logged into the kentico website.
In the LogonForm.ascx, i have added this code :
<cc1:ModalPopupExtender ID="mpePopUp" runat="server" PopupControlID="pnlMessageBox"
<asp:Panel runat="server" ID="pnlMessageBox">
And to the end of Login1_LoggedIn method with in the codebehind file (LogonForm.ascx.cs),
Unfortunately no message is popping up after a successful login.
I have tried the same code in a button placed outside the <asp:login> control, and it works perfect.
How i will force the modalpopupextender control to display after a successful login and before showing the redirect url?
Your issue is that you open popup and immediately redirect user to the redirect url.
If you remove/comment our URLHelper.Redirect(redirectUrl); line you should see the popup.
I'd recommend adding some button to your popup (e.g. OK) and perform actual redirect whenever user clicks that button.
Thanks Roman for a quick reply.
But even if i have commented the Redirect url, the popup is not showing up on the screen.
I have tried debugging the code, and the code successfully passes the mpePopUp.Show(); line without any error.
Why not show the popup on the page you redirect the employee to instead?
Please, sign in to be able to submit a new answer.