After trying some solutions from this and many other questions I wasn\'t able to get what is exact problem in my code. My code
$(document).ready(function() {
I tried a lot and finally i got the solution using below code.
$.ajax({ type: "POST", url: "page name/method name", data: '{ param 1: "value", param 2: "value" }', contentType: "application/json; charset=utf-8", success: function (data) {} });