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. Image for the cookie policy date

UpdatePanel to prevent full Page Postback when using OnServer-Methods

Hi guys,

Is it somehow possible to use an UpdatePanel or else to prevent the full Page Postback when using OnServer-Methods?

When putting a Schedule Control inside an UpdatePanel within a standard fresh built ASP.NET Web Forms App with .NET 4.5 all other controls are not causing a full Page Postback inside an UpdatePanel with EnablePartialRendering enabled on the ScriptManager but the Schedule Control will do a Page Postback eg. for accessing the OnServerAppointmentCreated Method.

Thanks,
Manuel


3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team December 21, 2018 05:23 AM UTC

 
Thank you for contacting Syncfusion support. 
 
We have prepared the below sample using UpdatePanel to prevent the page reload on calling server methods. 
 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
        <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="Schedule1" /> 
        </Triggers> 
        <ContentTemplate> 
            <ej:Schedule ID="Schedule1" ClientIDMode="Static" Height="525px" Width="100%" CurrentDate="5/5/2014" runat="server" DataSourceID="SqlDataSource1" OnServerAppointmentClick="Schedule1_ServerAppointmentClick" > 
                <AppointmentSettings Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" /> 
            </ej:Schedule> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT * FROM [Appointment]"></asp:SqlDataSource> 
</asp:Content> 
 
Regards, 
Karthigeyan 
 



MS Manuel S December 21, 2018 01:12 PM UTC

Awesome. Works like a charm now!

Didn't had in mind that I was simply missing the AsyncPostBackTrigger.

Merry Xmas,
Manuel



KK Karthigeyan Krishnamurthi Syncfusion Team December 24, 2018 03:36 AM UTC

 
We are happy that our solution fulfilled your requirement. 
 
Regards, 
Karthigeyan 


Loader.
Live Chat Icon For mobile
Up arrow icon