Apparently this does the trick:
Instead of calling Server.Transfer in user control, call this:
Server.Execute(URL, Page.Response.Output);
Page.Response.End();
This will replace the whole aspx page that includes the user control
(instead of replacing only the user control content).
jurev wrote:
Quote:
In ASP.NET 2.0 I created a custom user control, in overriden Render
event I put Server.Transfer command. I put my control in aspx page. The
behavior is strange: expected behavior would be that the content of
transfered page should be displayed instead of my current aspx page.
But in this case, the content of transfered page is displayed inside
the aspx page where my user control was placed.
Question: what to do in user control Render event when I want the
parent aspx page to be transfered to another page? |