- Created event
- Input event
- Change event
- Focus event
- Blur event
- Destroyed event
Contact Support
Events in ASP.NET MVC TextArea Control
22 Mar 20244 minutes to read
This section describes the TextArea events that will be triggered when appropriate actions are performed. The following events are available in the TextArea control.
Created event
The TextArea control triggers the Created event when the TextArea control is created. This event provides users with an opportunity to perform actions immediately after the TextArea has been created and initialized.
@using Syncfusion.EJ2.Inputs
@Html.EJS().TextArea("default").Created("Created").Render()
<script>
function Created() {
// Here, you can customize your code.
}
</script>
public ActionResult Created()
{
return View();
}
Input event
The TextArea control triggers the Input each time when the value of TextArea has changed. This event provides users with an opportunity to perform actions in response to real-time changes in the TextArea’s content.
The InputEventArgs passed as an event argument provides the details about the input event in the TextArea.
@using Syncfusion.EJ2.Inputs
@Html.EJS().TextArea("default").Input("InputHandler").Render()
<script>
function InputHandler(args) {
// Here, you can customize your code.
}
</script>
public ActionResult Input()
{
return View();
}
Change event
The TextArea control triggers the Change event when the content of TextArea has changed and gets focus-out. This event provides users with an opportunity to execute specific actions in response to changes made by the user.
The ChangedEventArgs passed as an event argument provides the details about the changes in the TextArea’s value.
@using Syncfusion.EJ2.Inputs
@Html.EJS().TextArea("default").Change("ChangeHandler").Render()
<script>
function ChangeHandler(args) {
// Here, you can customize your code.
}
</script>
public ActionResult Change()
{
return View();
}
Focus event
The TextArea control triggers the Focus when the TextArea gains focus. This event allows developers to execute specific actions when the user interacts with the TextArea by focusing on it.
The FocusInEventArgs passed as an argument provides details about the focus event in the TextArea.
@using Syncfusion.EJ2.Inputs
@Html.EJS().TextArea("default").Focus("FocusHandler").Render()
<script>
function FocusHandler(args) {
// Here, you can customize your code.
}
</script>
public ActionResult Focus()
{
return View();
}
Blur event
The TextArea control triggers the Blur when the TextArea loses focus. This event allows users to execute specific actions when the user interacts with the TextArea by moving focus away from it.
The FocusOutEventArgs passed as an argument provides details about the blur event in the TextArea.
@using Syncfusion.EJ2.Inputs
@Html.EJS().TextArea("default").Blur("BlurHandler").Render()
<script>
function BlurHandler(args) {
// Here, you can customize your code.
}
</script>
public ActionResult Blur()
{
return View();
}
Destroyed event
The TextArea control triggers the Destroyed when the TextArea control is destroyed.
@using Syncfusion.EJ2.Inputs
@Html.EJS().TextArea("default").Destroyed("Destroyed").Render()
<script>
function Destroyed() {
// Here, you can customize your code.
}
</script>
public ActionResult Destroyed()
{
return View();
}