Ladda sida utan Response.Redirect()

Finns det någon funktion i EPiServer som gör att jag manuellt kan ladda en sida? Jag vill använda en asp:dropdownlist och dess OnSelectedIndexChanged för att navigera till en sida men vill helst inte använda Response.Redirect().
May 29, 2005 20:32
Have you considered Server.Transfer or do you mean a completely different way of navigation altogether? Server.Transfer has its uses but whats wrong with Response.Redirect ?
May 30, 2005 9:30
Server.Transfer could be a solution but i have discovered some issues with EPiServer. The execution cannot be transfered to a EPiServer page cause it has to go directly to a physical file and not a "virtual" one as EPiServer pages would be; /Page____001.aspx A Server.Transfer to /Page.aspx should work fine. And I ask the same question as John Walsh, what's wrong with Redirect?
May 30, 2005 11:11
I believe EPiServer handles /Page____001.aspx and /Page.aspx?id=001 regardless of the mode you selected... try it for yourself...
May 30, 2005 11:58
I created one simple page with two buttons, one Redirect and one Transfer. The Redirect button peforms a Response.Redirect to the page "/templates/page.aspx?id=59" and works fine. The Transfer button peforms a Server.Transfer to the page "/templates/page.aspx?id=59" and casts an exception "System.InvalidCastException: Specified cast is not valid". If I change the url to "/templates/page____59.aspx" instead the results are similar. Redirects works fine once again and Transfer fails yet again with the exception "Error executing child request for /templates/page____59.aspx". Maybe I'm doing smething wrong?!
May 30, 2005 13:12
Oh I see what you mean - I thought it was complaining because there is no such page as page____58.aspx yet there is a page called page.aspx ... either way - a good thread for future reference :)
May 30, 2005 13:39
I have tried Server.Transfer but received the error "EPiServer.Core.EPiServerException: The current template does not match the specified page type file". I would like to avoid Response.Redirect() because it puts unnecessary load on the server by sending a new request. The other reason is that I loose the Viewstate. So I thought EPiServer might have some convenient function letting me do a "redirect" without loosing the Viewstate. Thanks for helping out.
May 30, 2005 19:23
What is it you are trying to do? Im curious...
May 31, 2005 9:02
Server.Transfer should work fine to do a server-side redirect (no client involved). If you get the "template does not match the specified page type file" exception, it's because the page you are redirecting to cannot be accessed with the aspx file provided in the URL (by design, for security reasons). You can override this behavior by compiling the aspx with the following override: public override void ValidatePageTemplate() { }
May 31, 2005 9:38
When I do a Transfer the exception is "Error executing child request". Am I doing something wrong?
May 31, 2005 15:44
I'm using a asp:dropdownlist to navigate to pages and thought it would be a good idea using server side forwarding instead of a redirect, mostly to leave the dropdownlist intact. On the other hand this approach might not be useful after all as the viewstate is lost as soon as the user navigates to a page not using the dropdownlist. Dooh! I will just have to save the dropdown settings in personalized data.
May 31, 2005 20:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.