I want to add TextArea value in database after that I want to clear the TextArea. How can I achieve this?
View
@using (Ajax.BeginForm("ResearcherMessage", "Researcher", new AjaxOptions { UpdateTargetId = "ResearcherMessageDiv" }))
{
@Html.TextArea("MessageTextArea", new { @class = "messageTextArea" })
<br />
<input id="AddMessageSubmit" type="submit" value="Add Message" />
}
Amend your AjaxOptions object to include the following property:
Then define a JavaScript function with that name that does what you need, for example: