Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="product-pop-up" style="display: none; width: 700px;">
- <div class="product-page product-pop-up">
- <div class="row" id="modalBody">
- </div>
- </div>
- </div>
- $(".button-first-view").click(function () {
- var productId = $(this).data("id");
- $.ajax
- ({
- url: "/Product/FastViewProduct",
- data: { "productId": productId },
- contentType: "application/html; charset=utf-8",
- type: "GET",
- cache: !0,
- datatype: "html",
- success: function (t) {
- $("#modalBody").html(t);
- },
- error: function () {
- $("#modalBody").html("some things wrong");
- }
- });
- });
- public async Task<ActionResult> FastViewProduct(int productId)
- {
- var quickView = await _objProductDal.GetProductForQuickView(productId);
- if (quickView.ProductName == null)
- {
- ViewBag.ErrorMessage = "Something wrong, No product Found";
- }
- return PartialView("_FastViewProductPartial", quickView);
- }
Add Comment
Please, Sign In to add comment