Is it possible to redirect to another page in your application from the start page BEFORE the user has been authenticated if you're using FORMS authentication? I can't seem to get it to work.
Simple example: In your start page simply try to redirect...
private void Page_Load(objec t sender, System.EventArg s e)
{
if (!IsPostBack) // or is. doesn't matter.
{
Response.Redire ct(APageInYourA pplication.aspx );
}
}
I also tried
Response.Redire ct(APageInYourA pplication.aspx ,false);
and
Server.Execute( APageInYourAppl ication.aspx);
all to no avail.
The reason I'm doing this.........
The application can be configured to run either 'browser' mode or "applicatio n" mode. (both load in the browser, just in application mode I remove all the browser controls.)
Now, you can't initiate the application without all the controls. You have to load a page first then do a window.open and specify the window parameters. So... I load a small window, window.open() to the login page then try to close the small window. Closing the small window requires the user to confirm. Can't get around that. Anyway... since the small window just does a window.open() then immediately tries to close itself, it never fully renders before asking to user to allow it to close. Therefore my "loading... " graphic never displays and the user is left staring at a blank page. So I figured, load the graphic, redirect to another page that will do the window.open() so that the first page can finish rendering and display my graphic and then close the window.
But it seems you cannot redirect from the start page if you're using Forms authentication.
Any ideas? Am I WAAYYY off?
Simple example: In your start page simply try to redirect...
private void Page_Load(objec t sender, System.EventArg s e)
{
if (!IsPostBack) // or is. doesn't matter.
{
Response.Redire ct(APageInYourA pplication.aspx );
}
}
I also tried
Response.Redire ct(APageInYourA pplication.aspx ,false);
and
Server.Execute( APageInYourAppl ication.aspx);
all to no avail.
The reason I'm doing this.........
The application can be configured to run either 'browser' mode or "applicatio n" mode. (both load in the browser, just in application mode I remove all the browser controls.)
Now, you can't initiate the application without all the controls. You have to load a page first then do a window.open and specify the window parameters. So... I load a small window, window.open() to the login page then try to close the small window. Closing the small window requires the user to confirm. Can't get around that. Anyway... since the small window just does a window.open() then immediately tries to close itself, it never fully renders before asking to user to allow it to close. Therefore my "loading... " graphic never displays and the user is left staring at a blank page. So I figured, load the graphic, redirect to another page that will do the window.open() so that the first page can finish rendering and display my graphic and then close the window.
But it seems you cannot redirect from the start page if you're using Forms authentication.
Any ideas? Am I WAAYYY off?
Comment