ASP.NET 2.0 introduces a new feature to allow cross-Postbacks to other webforms using the PostBackUrl property.
This method is very nice and allows to replace ugly workaround that were required in ASP.NET 1.x like using GET requests with query strings or adding client side script that cleared the viewstate form field.
There is only one caveat with this new method: It does not work with MCMS 2002. MCMS 2002 Service Pack 2 which is required to allow MCMS to work with ASP.NET 2.0 adds some additional client side javascript code that prevents the PostBackUrl property from working properly as it always changes the Url back to the MCMS template file. So the logic of this client side script does not handle the cross-Postback situation correct.
To overcome this limitation it is required to extend the client side javascript with some logic that allows the script to recognize the cross-Postback correct and not to change the Url back to the MCMS template file.
The good thing here is that the MCMS javascript code already contains the logic not to change the URL back if the __CMS_PostbackFormBeenReset variable contains a value of true. This is used in some MCMS internal console actions. So we only need to ensure that this variable is set to true when a cross postback happens. As all cross Postback calls use the WebForm_DoPostBackWithOptions javascript routine injected by ASP.NET 2.0 the easiest way to achieve this is to redirect the calls to this routine to our own routine, set the __CMS_PostbackFormBeenReset variable and then to call the original WebForm_DoPostBackWithOptions routine.
As this client side code would have to be added to all template files the best solution is to add the logic using a HttpModule that only has to be added to the web.config once and then ensures that the script will be added automatically to all template files:
As some of you already noticed: GotDotNet is now down and the code samples previously hosted there have
PingBack from http://www.keyongtech.com/363274-embedding-a-standard-form-inside