Flashy pages in ASP.NET

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top