D
debbiedchang
Hi, I have a custom user login authentication page. There are times
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).
I thought maybe setting the document.location would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~~~
FormsAuthentication.RedirectFromLoginPage("user name", false);
string strMsgBoxScript = "<script language='javascript'>alert("Warning
message"); document.location=xyz.aspx'</script>"
Page.RegisterStartupScript("MsgBoxScript", strMsgBoxScript);
~~~~~~~~~~~~~~~~~
I tried adding in a response.redirect("xyz.aspx") but that redirects
the page without displaying the popup.
This has been driving me crazy so I would be extremely grateful for any
insight!
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).
I thought maybe setting the document.location would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~~~
FormsAuthentication.RedirectFromLoginPage("user name", false);
string strMsgBoxScript = "<script language='javascript'>alert("Warning
message"); document.location=xyz.aspx'</script>"
Page.RegisterStartupScript("MsgBoxScript", strMsgBoxScript);
~~~~~~~~~~~~~~~~~
I tried adding in a response.redirect("xyz.aspx") but that redirects
the page without displaying the popup.
This has been driving me crazy so I would be extremely grateful for any
insight!