People Empowering People Through Knowledge
/** MVCForum Code Below / / Here is the Report.cshtml Razor code as requested **/
@model MVCForum.Website.ViewModels.ReportPostViewModel
@{ Layout = "~/Views/Shared/_LayoutFullWidth.cshtml"; ViewBag.Title = string.Concat(Html.LanguageString("Report.ReportPostBy"), Model.PostCreatorUsername); }
@section Header
{
@(
Bundle.JavaScript()
.Add("/Scripts/jquery.validate.min.js")
.Add("/Scripts/jquery.validate.unobtrusive.min.js")
.MvcRender("~/scripts/cache/validate-combined_#.js")
)
}
<div class="col-md-6 col-md-offset-3">
@using (Html.BeginForm("Report", "post", FormMethod.Post, new { @class = "form-report" }))
{
@Html.HiddenFor(x => Model.PostId)
@Html.ValidationSummary(false)
<h2>@ViewBag.Title</h2>
<div class="form-group">
@Html.LabelFor(model => model.Reason)
@Html.TextAreaFor(model => model.Reason, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Reason)
</div>
<div class="submit-holder">
<button type="submit" class="btn-mvc btn-mvc-green btn-mvc-large">
@Html.LanguageString("Buttons.Send")
</button>
</div>
}
</div>
/** BELOW IS THE Webconfig.xml FILE FOR MVCForum MVC Razor WEB APP **/
<add name="MVCForumContext"
providerName="System.Data.SqlClient"
connectionString="Data Source=.\SQLSERVEREXP12;AttachDbFilename=|DataDirectory|\AnyNameDB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" />