Enabling @RenderSection in the Music store code.

This commit is contained in:
Praburaj 2014-04-08 12:48:12 -07:00
parent 0db736b056
commit c0250392b2
8 changed files with 51 additions and 30 deletions

View File

@ -32,5 +32,8 @@
} }
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }

View File

@ -56,5 +56,8 @@
</div> </div>
</div> </div>
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }

View File

@ -26,6 +26,10 @@
</section> </section>
</div> </div>
</div> </div>
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }

View File

@ -39,5 +39,8 @@
} }
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }

View File

@ -7,29 +7,32 @@
} }
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }
@*@using (Html.BeginForm())*@ @*@using (Html.BeginForm())*@
@*{*@ @*{*@
<h2>Address And Payment</h2> <h2>Address And Payment</h2>
<fieldset> <fieldset>
<legend>Shipping Information</legend> <legend>Shipping Information</legend>
@*@Html.EditorForModel()*@
</fieldset>
<fieldset>
<legend>Payment</legend>
<p>We're running a promotion: all music is free with the promo code: "FREE"</p>
<div class="editor-label"> @*@Html.EditorForModel()*@
@*@Html.Label("Promo Code")*@ </fieldset>
</div> <fieldset>
<div class="editor-field"> <legend>Payment</legend>
@Html.TextBox("PromoCode") <p>We're running a promotion: all music is free with the promo code: "FREE"</p>
</div>
</fieldset>
<input type="submit" value="Submit Order" /> <div class="editor-label">
@*@Html.Label("Promo Code")*@
</div>
<div class="editor-field">
@Html.TextBox("PromoCode")
</div>
</fieldset>
<input type="submit" value="Submit Order" />
@*}*@ @*}*@

View File

@ -28,10 +28,10 @@
@*Bug: HtmlHelpers missing*@ @*Bug: HtmlHelpers missing*@
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
@*<li>@Html.ActionLink("Home", "Index", "Home")</li>*@ @*<li>@Html.ActionLink("Home", "Index", "Home")</li>*@
@await Component.InvokeAsync("GenreMenu") @await Component.InvokeAsync("GenreMenu")
@* @Html.Action("CartSummary", "ShoppingCart")*@ @* @Html.Action("CartSummary", "ShoppingCart")*@
</ul> </ul>
@await Html.PartialAsync("_LoginPartial") @await Html.PartialAsync("_LoginPartial")
</div> </div>
</div> </div>
@ -48,11 +48,10 @@
@*Bug: No script helpers yet*@ @*Bug: No script helpers yet*@
@*@Scripts.Render("~/bundles/jquery") @*@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap") @Scripts.Render("~/bundles/bootstrap")*@
@RenderSection("scripts", required: false)*@
<script src="~/Scripts/jquery-1.10.2.js"></script> <script src="~/Scripts/jquery-1.10.2.js"></script>
<script src="~/Scripts/bootstrap.js"></script> <script src="~/Scripts/bootstrap.js"></script>
<script src="~/Scripts/respond.js"></script> <script src="~/Scripts/respond.js"></script>
@RenderSection("scripts", required: false)
</body> </body>
</html> </html>

View File

@ -71,5 +71,8 @@
</div> </div>
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }

View File

@ -71,5 +71,8 @@
</div> </div>
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @*Bug : Script helpers are out of scope for alpha*@
@*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
} }