I'm trying to use an UpdatePanel in my ASP.NET application. Unfortunately, it seems that I can't do this if I am using Server.Transfer() in my application.
Modifying that component of the application is not possible - the architecture makes extensive use of Server.Transfer() - in essence, every page request goes through this method. Does any workaround exist for this issue exist? Having to do full-page postbacks is so unfashionable these days...
I've got it! Thank Og for strange foreign language blogs :)
To fix it, I can simply tell the ASP.NET AJAX client-side framework to direct the partial request directly at the real target of the Server.Transfer() call. I am quite scared of the possible side-effects (who knows what this skips - the infrastructure does have a purpose) but it seems to be working fine so far.
Here is the method that fixes the problem, called in my page's Load event:
Response.Write("window.open('new tab page link','_blank');"); Response.Write("this.window.location='link to another page';");
This should work in a more proper way:
if you call
Server.Transfer
from a control's event handler just register that control as a PostBackTrigger in the Triggers section of the update panel: