John,
I've one question extended from this thread.
I've two frames in default.aspx
<iframe name="menu" runat="server"/>
<iframe name="main" runat="server"/>
login process is in Main frame, when use press the Button "Login", and
the authentication is ok, I want Menu frame refresh, the same time when Main
frame refresh or redirect.
How can I achieve this ?
Assuming that you are authorizing the user in a frame other than the top,
but with the same parent. If this is the case you can reload the top frame
with the following javascript code.
RegisterStartupScript("Reload", "<SCRIPT
Language='Javascript'>parent.FRAMENAME.document.Form1.submit()</" &
"Script>")
Replace the FRAMENAME with the name of the top frame as it is in the
Framesetting document. You can then put the code which checks if the user
has already logged on in the page_load event of top.aspx as this is the only
method that will be executed when the page reloads.
If you are authorizing the user in a pop up, say from the Login link in
the top frame, the javascript code will be a little different.
RegisterStartupScript("Reload", "<SCRIPT
Language='Javascript'>window.opener.document.Form1.submit() said:
window.opener will reference the window that has opened the pop-up page.
Put the code in the page_load as just described and you should not have a
problem.
hope this solves your problem,
John
with a "Login" hyperlink. If the user has already logged in I want this
link to change to "Logout". I am using forms-based authentication and think
I know how to accomplish this part. My problem is that the top frame does
not reload to get to the "If User.Identity.IsAuthenticated Then". Please
don't tell me I shouldn't be using frames; this is a school assignment and
the deadline is a week away (no time to redo what I have already done). Is
there a way to get this link to change after the top.aspx page has already
loaded?