Views/Default/ProductDetail.cshtml
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
@model MvcShopping.Models.Product
@{
var ajaxOption = new AjaxOptions { OnSuccess = "AddCartSuccess", OnFailure = "AddCartFail", HttpMethod = "POST", Confirm="确定要添加到购物车?" };
}
@section Scripts{
@Scripts.Render("~/bundles/jquery")
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"> </script>
<script>
function AddCartSuccess() {
alert("添加成功");
}
function AddCartFail(xhr)
{
alert("添加失败"+xhr);
}
</script>
}
<div id="mydiv"></div>
<h2>您正在浏览“@Model.Name”的商品</h2>
<legend></legend>
<div>
<h4>@Html.DisplayNameFor((model) =>model)</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Description)
</dt>
<dd>
@Html.DisplayFor(model => model.Description)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Price)
</dt>
<dd>
@Html.DisplayFor(model => model.Price)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PublishOn)
</dt>
<dd>
@Html.DisplayFor(model => model.PublishOn)
后面还有 13 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。