I have a razor-pages button tag-helper calling a asp-page-handler that has an asp-route-content parameter that needs to gets it's value from a textarea control within the razor page view on button submit. How can this be accomplished?
Razor view partial code:
<form method="post">
<div class="modal-body">
<textarea id="content" name="content" cols="90" rows="4" placeholder="Comment" required></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" asp-page="/Post" asp-page-handler="ReplyToComment"
asp-route-blogid="@Model.BlogID" asp-route-parentid="@Model.ID"
asp-route-email="@user.Email" asp-route-author="@author"
asp-route-content="" class="btn btn-primary">Save Reply</button>
</div>
</form>
Razor page handler :
public async Task<IActionResult> OnPostReplyToComment(int blogid,
int parentid, string email, string author, string content)