I have a form that displays a textbox for comments. Currently, when I click on Save, I lose my old comment.

@using (Html.BeginForm("SaveComment", "Home", FormMethod.Post))
{
    @Html.TextAreaFor(model => model.Comments)
    <input type="button" id="saveBtn" class="btn btn-primary" value="Save" />
}

I'd like to append my new comment to the existing one instead of overriding it. How can I do something like this below?

@Html.TextAreaFor(model => model.Comment += this.value)

Related posts

Recent Viewed