@using System.Configuration
@model ExampleMvcApp.BlogCommentViewModel
Guid guid = Guid.NewGuid();
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BlogCommentViewModel</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<div class="col-md-6 col-md-offset-3">
<h1>Comment form example</h1>
<li class="comment-item">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Joe Bloggs</div>
<p>Thank you for writing these posts, very useful as I embark on my journey!</p>
<div class="comment-item-reply admin">
<img class="media-object" alt="" src="/content/images/admin-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Admin</div>
<p>Hi, no problem at all, i'm pleased to hear that my posts have played a part with your journey.</p>
<div class="comment-item-reply ">
<img class="media-object" alt="anon" src="/content/images/anon-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Oct 17, 2019</div>
<div class="comment-author">Joe Blogs</div>
<div id="@("comment-form-" + guid)" class="reply-comment-form js-reply-comment-form">
@using (Ajax.BeginForm("CreateComment", "BlogCommentSurface", null, new AjaxOptions
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "comment-form-" + guid
@Html.LabelFor(m => m.FullName) @Html.ValidationMessageFor(m => m.FullName)
@Html.TextBoxFor(m => m.FullName, new { placeholder = "Full Name", @class = "form-control" })
@Html.LabelFor(m => m.Email) @Html.ValidationMessageFor(m => m.Email)
@Html.TextBoxFor(m => m.Email, new { placeholder = "Email", @class = "form-control" })
@Html.LabelFor(m => m.Comment) @Html.ValidationMessageFor(m => m.Comment)
@Html.TextAreaFor(m => m.Comment, new { placeholder = "Message", @class = "form-control", @rows = 7 })
<div class="recaptcha-wrapper">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div id="@("reply-recaptcha-" + guid)" class="g-recaptcha"
data-sitekey="6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe"
data-callback="formCaptchaSuccess">
@Html.ValidationMessage("Captcha")
<button type="submit" id="form-reply-submit" class="btn btn-md btn-primary-filled btn-form-submit post-reply-submit">
<strong>POST REPLY</strong>
<p>----------------------------------------------------------------------------------------------------------------</p>
<li class="comment-item">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Joe Bloggs</div>
<p>Thank you for writing these posts, very useful as I embark on my journey!</p>
<div class="comment-item-reply admin">
<img class="media-object" alt="" src="/content/images/admin-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Admin</div>
<p>Hi, no problem at all, i'm pleased to hear that my posts have played a part with your journey.</p>
<div class="comment-item-reply ">
<img class="media-object" alt="anon" src="/content/images/anon-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Oct 17, 2019</div>
<div class="comment-author">Joe Blogs</div>
<div id="@("comment-form-" + guid)" class="reply-comment-form js-reply-comment-form">
@using (Ajax.BeginForm("CreateComment", "BlogCommentSurface", null, new AjaxOptions
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "comment-form-" + guid
@Html.LabelFor(m => m.FullName) @Html.ValidationMessageFor(m => m.FullName)
@Html.TextBoxFor(m => m.FullName, new { placeholder = "Full Name", @class = "form-control" })
@Html.LabelFor(m => m.Email) @Html.ValidationMessageFor(m => m.Email)
@Html.TextBoxFor(m => m.Email, new { placeholder = "Email", @class = "form-control" })
@Html.LabelFor(m => m.Comment) @Html.ValidationMessageFor(m => m.Comment)
@Html.TextAreaFor(m => m.Comment, new { placeholder = "Message", @class = "form-control", @rows = 7 })
<div class="recaptcha-wrapper">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div id="@("reply-recaptcha-" + guid)" class="g-recaptcha"
data-sitekey="6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe"
data-callback="formCaptchaSuccess">
@Html.ValidationMessage("Captcha")
<button type="submit" id="form-reply-submit" class="btn btn-md btn-primary-filled btn-form-submit post-reply-submit">
<strong>POST REPLY</strong>
<p>----------------------------------------------------------------------------------------------------------------</p>
<li class="comment-item">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Joe Bloggs</div>
<p>Thank you for writing these posts, very useful as I embark on my journey!</p>
<div class="comment-item-reply admin">
<img class="media-object" alt="" src="/content/images/admin-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Admin</div>
<p>Hi, no problem at all, i'm pleased to hear that my posts have played a part with your journey.</p>
<div class="comment-item-reply ">
<img class="media-object" alt="anon" src="/content/images/anon-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Oct 17, 2019</div>
<div class="comment-author">Joe Blogs</div>
<div id="@("comment-form-" + guid)" class="reply-comment-form js-reply-comment-form">
@using (Ajax.BeginForm("CreateComment", "BlogCommentSurface", null, new AjaxOptions
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "comment-form-" + guid
@Html.LabelFor(m => m.FullName) @Html.ValidationMessageFor(m => m.FullName)
@Html.TextBoxFor(m => m.FullName, new { placeholder = "Full Name", @class = "form-control" })
@Html.LabelFor(m => m.Email) @Html.ValidationMessageFor(m => m.Email)
@Html.TextBoxFor(m => m.Email, new { placeholder = "Email", @class = "form-control" })
@Html.LabelFor(m => m.Comment) @Html.ValidationMessageFor(m => m.Comment)
@Html.TextAreaFor(m => m.Comment, new { placeholder = "Message", @class = "form-control", @rows = 7 })
<div class="recaptcha-wrapper">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div id="@("reply-recaptcha-" + guid)" class="g-recaptcha"
data-sitekey="6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe"
data-callback="formCaptchaSuccess">
@Html.ValidationMessage("Captcha")
<button type="submit" id="form-reply-submit" class="btn btn-md btn-primary-filled btn-form-submit post-reply-submit">
<strong>POST REPLY</strong>
<p>----------------------------------------------------------------------------------------------------------------</p>
<li class="comment-item">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Joe Bloggs</div>
<p>Thank you for writing these posts, very useful as I embark on my journey!</p>
<div class="comment-item-reply admin">
<img class="media-object" alt="" src="/content/images/admin-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Apr 21, 2016</div>
<div class="comment-author">Admin</div>
<p>Hi, no problem at all, i'm pleased to hear that my posts have played a part with your journey.</p>
<div class="comment-item-reply ">
<img class="media-object" alt="anon" src="/content/images/anon-blog-comment.jpg">
<div class="comment-info">
<div class="comment-date">Oct 17, 2019</div>
<div class="comment-author">Joe Blogs</div>
<div id="@("comment-form-" + guid)" class="reply-comment-form js-reply-comment-form">
@using (Ajax.BeginForm("CreateComment", "BlogCommentSurface", null, new AjaxOptions
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "comment-form-" + guid
@Html.LabelFor(m => m.FullName) @Html.ValidationMessageFor(m => m.FullName)
@Html.TextBoxFor(m => m.FullName, new { placeholder = "Full Name", @class = "form-control" })
@Html.LabelFor(m => m.Email) @Html.ValidationMessageFor(m => m.Email)
@Html.TextBoxFor(m => m.Email, new { placeholder = "Email", @class = "form-control" })
@Html.LabelFor(m => m.Comment) @Html.ValidationMessageFor(m => m.Comment)
@Html.TextAreaFor(m => m.Comment, new { placeholder = "Message", @class = "form-control", @rows = 7 })
<div class="recaptcha-wrapper">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div id="@("reply-recaptcha-" + guid)" class="g-recaptcha"
data-sitekey="6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe"
data-callback="formCaptchaSuccess">
@Html.ValidationMessage("Captcha")
<button type="submit" id="form-reply-submit" class="btn btn-md btn-primary-filled btn-form-submit post-reply-submit">
<strong>POST REPLY</strong>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/mvc/4.0/jquery.validate.unobtrusive.min.js"></script>