Ну так и поступил, вот пример:private ScriptManager _AjaxManager; /// <summary>
/// Oninit fires before page load. Modifications to the page that are necessary to support Ajax are done here.
/// </summary>
//protected override void OnInit(EventArgs e)
protected void AAA()
{
_AjaxManager = ScriptManager.GetCurrent(this.Page);
if (_AjaxManager == null)
{
//create new ScriptManager and EnablePartialRendering
_AjaxManager = new ScriptManager();
_AjaxManager.EnablePartialRendering = true;
// Fix problem with postbacks and form actions (DevDiv 55525)
Page.ClientScript.RegisterStartupScript(this.GetType(), this.ID, "_spOriginalFormAction = document.forms[0].action;", true);
if (this.Page.Form != null)
{
string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
this.Page.Form.Controls.AddAt(0, _AjaxManager);
}
}
}
protected override void CreateChildControls()
{
if (this.Field != null && this.ControlMode != SPControlMode.Display)
{
base.CreateChildControls();
AAA();
if (!this.Page.IsPostBack)
{
if (this.ControlMode == SPControlMode.New)
{
}
}
}
}
А вы как делали?
Спасибо, получил.
[b][q]Varg
Данное сообщение получено с сайта GotDotNet.RU
|