# Events

The Telerik UI Notification for ASP.NET MVC exposes multiple [events](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/notificationeventbuilder) 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](https://demos.telerik.com/aspnet-mvc/notification/events).

## Handling by Handler Name

The following example demonstrates how to subscribe to events by handler name.

```Razor HtmlHelper
    @(Html.Kendo().Notification()
        .Name("notification")
        .Position(p=>p.Top(120).Left(20))
        .Events(e => e
            .Show("notification_show")
            .Hide("notification_hide")
        )
    )
```

```JavaScript
    <script>
        function notification_show() {
            // Handle the show event.
        }

        function notification_hide() {
            // Handle the hide event.
        }
    </script>

```

## Handling by Template Delegate

The following example demonstrates how to subscribe to events by using a template delegate.

```Razor HtmlHelper
    @(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>)
        )
    )
```

## Next Steps

* [Using the Notification Events (Demo)](https://demos.telerik.com/aspnet-mvc/notification/events)

## See Also

* [Using the API of the Notification HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/notification/api)
* [Notification Server-Side API](https://www.telerik.com/aspnet-mvc/documentation/api/notification)
* [Notification Client-Side API](https://docs.telerik.com/kendo-ui/api/ui/notification)
