Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery selected checkboxes pass as paramater to C#

var checkItems = $('[name="checkbox"]:checked');
            var combines = [];
            $.each(checkItems, function (i, arqs) {
                combines.push($(this).attr('data-combine'));
           });
            var param = {
                'cmbinedata': combines
            }
          
              $.ajax({
                url: '@Url.Action("YourMethodName", "YourCOntrollerName")',
                data: JSON.stringify(param),
                type: "POST",
                dataType: "json",
                contentType: 'application/json; charset=utf-8',
                success: function (result) {
                      //do something
                },
                error: function (err) {
                    tata.error('Error', "Error !!!");
                    location.reload();
                }
            });
Comment

PREVIOUS NEXT
Code Example
Javascript :: FTP Get a directory listing of the current 
Javascript :: go-gitea/gitea 
Javascript :: fetch image from cloudinary in nodejs 
Javascript :: how to check if we reach end of div react hooks 
Javascript :: assignment of struct in solidity 
Javascript :: toast width match parent 
Javascript :: karma get attribute 
Javascript :: Lodash Cypress for each function 
Javascript :: ios ad mobs 
Javascript :: react rative release 
Javascript :: javascript checkbox in table cell not working 
Javascript :: Cannot resolve name `object`.Flow 
Javascript :: Mandatory Parameter Shorthand javascript 
Javascript :: how to hide all tabs in windows 10 
Javascript :: server starter code in js 
Javascript :: how to press a button throught the dev tools console 
Javascript :: JSON stringify method - the optional parameters 
Javascript :: "send data with window.location.href and get" 
Javascript :: btoa in js string only 
Javascript :: rnpm react-images-uploading 
Javascript :: fiffo in javascript 
Javascript :: how to detech my cosle errors in angualr 
Javascript :: nyaapi node 
Javascript :: many button with many action in javascript 
Javascript :: setImmediate clearImmediate 
Javascript :: node javascript retry promise.all 
Javascript :: Example of Logical OR assignment operator in es12 
Javascript :: hide modal event listener js 
Javascript :: Storing Values With Assignment Operators 
Javascript :: intro.js free alternative 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =