Hi,
I have the following code in my Jquery MVC application:
<script type="text/javascript">
$(document).ready(function () {
$("#.Submit").click(function () {
checkValidate();
var Name = $('#Name').val();
var Mobile = $('#MobileNumber').val();
var Email = $('#Email').val();
var Password = $('#Password').val();
var list = ["{Name: '" + Name + "',Mobile: '" + MobileNumber + "',Email: '" + email + "',Password: '" + Password + "'}"]
var jlist = $.toJSON(list);
$.post("/Shipper/AddProfile/", { jsonData: jlist },
function(data, textStatus) {
if (textStatus != "success") {
result = "false";
}
});
}
});
});
</script>
I was wondering if anyone can help me with the Controller Action code to insert this to the SQL database. It should Submit the following form:
Name
Mobile Number:
Email:
Password:
Submit Cancel.
Any help will be appreciated.