<div class="forms-box">
<div class="inputs">
@Html.HiddenFor(model => model.AddNewComment.CommentParentID)
@Html.LabelFor(model => model.AddNewComment.CommentText)
<div class="input-box">
@Html.TextAreaFor(
model => model.AddNewComment.CommentText,
new { @class = "comment-text" })
</div>
@Html.ValidationMessageFor(model => model.AddNewComment.CommentText)
</div>
在代码中:
我从两个中得到一个值
Model.AddNewComment.CommentParentID 或
模型.AddNewComment.CommentText
在我的控制器中。
public ActionResult BlogCommentReply(
int blogPostId,
BlogPostModel model,
bool captchaValid)
{
}