We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add AsyncPostBackTrigger on UpdatePanel for Button inside the ribbon

Thread ID:

Created:

Updated:

Platform:

Replies:

119025 May 5,2015 08:47 AM UTC May 12,2015 12:45 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Ribbon
Rakotondrabesa
Asked On May 5, 2015 08:47 AM UTC

Hi ,
I work with MasterPage and ContentPage and I have to register an AsyncPostBackTrigger on a Button inside the ribbon to refresh a ContentTemplate (ContentPlaceHolder) on my UpdatePanel. So I have an exception because the AsyncPostBackTrigger on the UpdatePanel don't find the button control. However if I just add this Button Control outside the ribbon the AsyncPostBackTrigger on the UpdatePanel can find it and its work.
I use the ribbon in the assembly
<%@ Register Assembly="Syncfusion.Tools.Web, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.Web.UI.WebControls.Tools" TagPrefix="syncfusion" %>
Can you help me?
Thanks

Muralishankar Sundaram [Syncfusion]
Replied On May 7, 2015 12:41 PM UTC

Hi Rakotondrabesa,

Thanks for contacting Syncfusion support.

The button control is not available since it was child control of Ribbon while trigger collection evaluating in update panel that’s why, the reported issue has thrown. So in order to avoid the exception, we suggest you to register the button in AsyncPostBackControl with script manager in Page_Load. Please refer the below code snippet:

[CS]

protected void Page_Load(object sender, EventArgs e)

{

// Register the AsyncPostBackControl in scriptmanager

ScriptManager scriptManager3 = ScriptManager.GetCurrent(this.Page);

Control button = Ribbon1.FindControl("button1");

scriptManager3.RegisterAsyncPostBackControl(button);

}

By default, any control which was placed under the update panel will trigger the asynchronous postback only. So let us know the reason why you have tried to trigger the button in update panel else have you tried to do asynchronous postback for a button which was act as sub control of Ribbon but placed outside of update panel. Then please add the AsynPostBackTrigger programmatically in the same update panel on page load event.

We have prepared the Ribbon sample with your use case scenario and its available in the bellow link:

http://www.syncfusion.com/downloads/support/forum/119025/WebApplication1_(2)-1569826691.zip

Please let us know if you have any other queries.

Regards,

Muralishankar


Rakotondrabesa
Replied On May 11, 2015 07:58 AM UTC

Hi Muralishankar,
Thanks for this help.
It's work now
 

Muralishankar Sundaram [Syncfusion]
Replied On May 12, 2015 12:45 PM UTC

Hi Rakotondrabesa,

Thanks for your update,

Please let us know if you have any other queries.

Regards,

Muralishankar


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;