I successfully add a webpart with UpdatePanel. However the second post back doesn’t seem to trigger? Why?
Excerpt from Mike Ammerlaan’s Blog
To do this, you may need to register a client startup script which disables this workaround, in addition to resetting the default form action:
This script may be directly embedded in the page. Or write a function like this:
private void EnsureUpdatePanelFixups()
if (this.Page.Form != null)
string formOnSubmitAtt = this.Page.Form.Attributes[“onsubmit”];
if (formOnSubmitAtt == “return _spFormOnSubmitWrapper();”)
this.Page.Form.Attributes[“onsubmit”] = “_spFormOnSubmitWrapper();”;
ScriptManager.RegisterStartupScript(this, typeof(UpdatePanel), “UpdatePanelFixup”, “_spOriginalFormAction = document.forms.action; _spSuppressFormOnSubmitWrapper=true;”, true);
This solves the second post back problem.