Back to Devexpress

BootstrapCallbackPanel.Callback Event

aspnetbootstrap-devexpress-dot-web-dot-bootstrap-dot-bootstrapcallbackpanel-25908939.md

latest3.9 KB
Original Source

BootstrapCallbackPanel.Callback Event

Fires when a round trip to the server has been initiated by a call to the client BootstrapClientCallbackPanel.PerformCallback method.

Namespace : DevExpress.Web.Bootstrap

Assembly : DevExpress.Web.Bootstrap.v25.2.dll

NuGet Package : DevExpress.Web.Bootstrap

Declaration

csharp
public event CallbackEventHandlerBase Callback
vb
Public Event Callback As CallbackEventHandlerBase

Event Data

The Callback event's data class is CallbackEventArgsBase. The following properties provide information specific to this event:

PropertyDescription
ParameterGets a string that contains specific information (if any) passed from the client side.

Example

This example demonstrates the basic functionality of the Callback Panel.

The image below shows the result:

csharp
protected void CallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e) {
    if(!string.IsNullOrEmpty(e.Parameter))
        passedInfo.InnerText = "Passed information: \"" + e.Parameter + "\"";
}
javascript
function onUpdateClick(s, e) {
    callbackPanel.PerformCallback("caused on the button click");
}
aspx
<dx:BootstrapCallbackPanel runat="server" ClientInstanceName="callbackPanel" OnCallback="CallbackPanel_Callback">
    <ContentCollection>
        <dx:ContentControl>
            <div class="card">
                <div class="card-body">
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sem lorem, rutrum at tincidunt aliquam, vulputate sit amet tellus. In hac habitasse platea dictumst. Morbi in dui a massa volutpat tristique. Aenean ultrices, elit ac commodo vestibulum, nisl neque pharetra est, id egestas neque leo dignissim augue. Vestibulum sodales metus at est maximus dictum. Quisque cursus felis id nisi auctor, volutpat imperdiet neque feugiat. Sed aliquet elit sem, ut vulputate lectus ultricies sit amet.</p>
                    <p><span class="badge badge-info"><%= IsCallback ? "The content was updated at " + DateTime.Now.ToLongTimeString() : "" %></span></p>
                    <small runat="server" id="passedInfo"></small>
                </div>
            </div>
        </dx:ContentControl>
    </ContentCollection>
</dx:BootstrapCallbackPanel>
<dx:BootstrapButton Text="Update" AutoPostBack="false" UseSubmitBehavior="false" runat="server">
    <ClientSideEvents Click="onUpdateClick" />
</dx:BootstrapButton>

See Also

BootstrapCallbackPanel Class

BootstrapCallbackPanel Members

DevExpress.Web.Bootstrap Namespace