# Events

The Telerik UI PopOver component for ASP.NET Core exposes the [`Hide`](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/popovereventbuilder#hidesystemfunc) and [`Show`](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/popovereventbuilder#showsystemstring) events. You can handle these events to implement custom functionality.

For a complete example on basic PopOver events, refer to the [demo on using the events of the PopOver](https://demos.telerik.com/aspnet-core/popover/events).

## Handling by Handler Name

The following example demonstrates how to subscribe to an event by a handler name.

```Razor HtmlHelper
    @(Html.Kendo().PopOver()
        .For("targetElementSelector")
        .Events(e => e.Show("onShow"))
        ... //Additional configuration
    )

    <script>
        function onShow(e){
            // Handle the Show event that triggers when the PopOver shows.
        }
    </script>
```

```Razor TagHelper
    @addTagHelper *, Kendo.Mvc

    <kendo-popover for="targetElementSelector" on-show="onShow">
        
    </kendo-popover>

    <script>
        function onShow(e){
            // Handle the Show event that triggers when the PopOver shows.
        }
    </script>
```

## Handling by Template Delegate

The following example demonstrates how to subscribe to an event by a template delegate.

```Razor HtmlHelper
    @(Html.Kendo().PopOver()
        .For("targetElementSelector")
        .Events(e => e.Show(@<text>
            function() {
                // Handle the Show event inline.
            }
            </text>)
        )
        ... //Additional configuration
    )
```

```Razor TagHelper
    @addTagHelper *, Kendo.Mvc

    <kendo-popover for="targetElementSelector" 
        on-show="function() {
            // Handle the Show event inline.
        }">
        
    </kendo-popover>
```

## Next Steps

* [Using the PopOver Events (Demo)](https://demos.telerik.com/aspnet-core/popover/events)

## See Also

* [Using the API of the PopOver for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/popover/api)

* [PopOver Server-Side HtmlHelper API](https://www.telerik.com/aspnet-core-ui/documentation/api/popover)

* [PopOver Server-Side TagHelper API](https://www.telerik.com/aspnet-core-ui/documentation/api/taghelpers/popover)

* [PopOver Client-Side API](https://docs.telerik.com/kendo-ui/api/ui/popover)
