PreviousPage is null

  • Thread starter Thread starter Bryce
  • Start date Start date
B

Bryce

I have a search page that submits to a search results page. I have set
the search results page to be authenticated, so when the user first
tries to search, it redirects them to a login screen. When they log in,
it goes to the search result screen. But when I do, the PreviousPage
variable is null.

Once logged in, when I go from the search to the search results screen,
PreviousPage is fine.

I'm using the authentication built into dot net using the following in
my web.config file:

<configuration...
<system.web>
...
<authentication mode="Forms" />
...
</system.web>
<location path="SearchResults.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>

The login form uses the System.Web.UI.WebControls.Login control.

I'm assuming that this uses a redirect? And this is why I'm losing the
PreviousPage? Any way around this other than putting the search
information in a session variable?
 
I believe PreviousPage works if you use Server.Transfer, but not if you use
Response.Redirect.
 
Steve said:
I believe PreviousPage works if you use Server.Transfer, but not if you
use Response.Redirect.

Thanks. But do I have the option of controling which mechanism it uses
to transfer to the intended control using the
System.Web.UI.WebControls.Login control and the asp.net authentication?
 
Back
Top