# PromptBox Events

The PromptBox component emits various events that let you handle user interactions and customize the behavior.

This article provides an overview of all available events of the PromptBox.

```Razor HtmlHelper
    @(Html.Kendo().PromptBox()
        .Name("promptBox")
        .Events(e => e
            .InputValueChange("onInputValueChange")
            .Focus("onFocus")
            .Blur("onBlur")
        )
    )

    <script>
        function onInputValueChange(e) {
            console.log("Content changed");
        }
        function onFocus(e) {
            console.log("Focused");
        }
        function onBlur(e) {
            console.log("Blurred");
        }
    </script>
```

```Razor TagHelper
    <kendo-promptbox name="promptBox"
        on-input-value-change="onInputValueChange"
        on-focus="onFocus"
        on-blur="onBlur">
    </kendo-promptbox>
    
    <script>
        function onInputValueChange(e) {
            console.log("Content changed");
        }
        function onFocus(e) {
            console.log("Focused");
        }
        function onBlur(e) {
            console.log("Blurred");
        }
    </script>
```

You can subscribe to the events by the handler name.

```javascript
    var promptbox = $("#promptBox").data("kendoPromptBox");
    promptbox.bind("inputValueChange", function(e) {
        console.log("Content changed");
    });
```

## See Also

* [Server-Side API of the PromptBox HtmlHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/promptbox)

* [Server-Side API of the PromptBox TagHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/taghelpers/promptbox)

* [JavaScript API Reference of the PromptBox](https://www.telerik.com/aspnet-core-ui/documentation/api/ui/promptbox)
