Hello every one,
I am working on mvc5 with visual studio 2015. I am using products.js file and called this products.js file on _Layout.cshtml page as shown below,

I have added this jquery code,
- passproductid = {
- passid: function () {
- $('.edit_product').on('click', function (e) {
- debugger;
- var _productId = $(this).attr('id');
- $.ajax({
- url: '/ProductCategory/GetProducts/',
- type: "POST",
- data: { productid: _productId.substring(10) },
- success: function (data) {
- $('#divresult').html(data);
- }
- });
- });
- }
- }
- @foreach (var item in Model)
- {
-
"[email protected]" onclick="return passproductid.passid()" class="edit_product"> but getting this error,
How can I solve this?2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

deva sahuPosted Sep 4, 2019, 10:05 PM
Vignesh ManiPosted Jan 10, 2017, 8:29 AM