# Events

You can subscribe to [all ImageEditor events](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/imageeditoreventbuilder) and then use them to further customize the behavior of the component.

The example below demonstrates how to use the [`Execute` event](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/imageeditoreventbuilder#executesystemstring) that the ImageEditor generates when the user executes a command.

```Razor HtmlHelper
@using Kendo.Mvc.UI

@(Html.Kendo().ImageEditor()
	.Name("imageEditor")
	.Height(700)
	.SaveAs(s => s.FileName("image_edited.png"))
	.ImageUrl(@Url.Content("~/shared/images/photos/sample.jpg"))
	.Events(ev => {
		ev.Execute("onExecute");
	})
)
```

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

    <h4>ImageEditor</h4>
    <kendo-imageeditor name="imageEditor" height="700" image-url="@Url.Content("~/shared/images/photos/sample.jpg")"
		on-execute="onExecute">
        <save-as file-name="image_edited.png" />
    </kendo-imageeditor>
```

```JS script
	<script>	
	function onExecute(e) {
		console.log(e.command);
	}
</script>
```

## Next Steps

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

## See Also

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