G
Guest
Hi,
I have ASP.NET pages that are displayed inside a parent frameset. There are
a couple of occasions where my .NET page needs to load a new parent frameset.
So, consider the Login function...enter username/pw and click "Login".
The postback logic validates the user info against the database, and then
executes the following code to redirect to a new parent page w/ the proper
..NET page inside.
This logic works, but when I click "Login", the site repaints the login page
first, and then redirects to the new site. On pages where I don't have this
feature, there's no screen flash.
So my question is, if I need to do server processing before I redirect
(validating entries), is there a better way for me to do it so that it
doesn't repaint first?? Any help is appreciated! Here's the code in the
aspx.vb code behind:
Function btnLogin_Click(...)
..
..
' some code to validate the user
..
..
Dim redirectURLScript As String = "<script language='javascript'>" & _
"window.parent.location = '" & URL.ToString & "';" & _
"</script>"
'Register script for redirect logic
Page.RegisterStartupScript("newURL", redirectURLScript)
End Function
I have ASP.NET pages that are displayed inside a parent frameset. There are
a couple of occasions where my .NET page needs to load a new parent frameset.
So, consider the Login function...enter username/pw and click "Login".
The postback logic validates the user info against the database, and then
executes the following code to redirect to a new parent page w/ the proper
..NET page inside.
This logic works, but when I click "Login", the site repaints the login page
first, and then redirects to the new site. On pages where I don't have this
feature, there's no screen flash.
So my question is, if I need to do server processing before I redirect
(validating entries), is there a better way for me to do it so that it
doesn't repaint first?? Any help is appreciated! Here's the code in the
aspx.vb code behind:
Function btnLogin_Click(...)
..
..
' some code to validate the user
..
..
Dim redirectURLScript As String = "<script language='javascript'>" & _
"window.parent.location = '" & URL.ToString & "';" & _
"</script>"
'Register script for redirect logic
Page.RegisterStartupScript("newURL", redirectURLScript)
End Function