New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Events
The Telerik UI Notification for ASP.NET Core exposes multiple events that allow you to control and customize the behavior of the UI component.
For a complete example on basic Notification events, refer to the demo on using the events of the Notification.
Handling by Handler Name
The following example demonstrates how to subscribe to events by handler name.
Razor
@(Html.Kendo().Notification()
.Name("notification")
.Position(p=>p.Top(120).Left(20))
.Events(e => e
.Show("notification_show")
.Hide("notification_hide")
)
)
Handling by Template Delegate
The following example demonstrates how to subscribe to events by using a template delegate.
Razor
@(Html.Kendo().Notification()
.Name("notification")
.Position(p=>p.Top(120).Left(20))
.Events(e => e
.Show(@<text>
function() {
// Handle the show event inline.
}
</text>)
.Hide(@<text>
function() {
// Handle the hide event inline.
}
</text>)
)
)