Posted on: 12/9/2014 5:00:01 PM | Views : 451

Hi,
I'm trying to call a C# function using Ajax with a variable but having issues.
var inCompanyName = "myCompany"; // **** THIS CALLS PAGE BUT DOES NOT PASS VARIABLE THROUGH **************************************/ $.ajax({ url: "/WriteToDatabase.aspx", type: "POST", data: { param1: inCompanyName, } }) .done(function (data) { alert("Done!"); }) .fail(function () { alert("Error!"); }) // **** THIS CALLS PAGE BUT DOES NOT PASS VARIABLE THROUGH **************************************/ /* $.ajax({ type: "post", url: "/WriteToDatabase.aspx", data: { param1: inCompanyName }, dataType: "json", success: function (result) { alert("succes ...

Go to the complete details ...