$(document).ready(function () {
var id1 = '<%=ViewData["UserName"]%>';
var id2 = '<%=ViewData["UsrProfile"]%>';
var msg = $('#addFrnd').attr('value');
$.ajax(
{
type: "POST",
url: "/Profile/SendFriendRequest",
data: {'id': id1 , 'id1': id2,'message':msg},
success: function (result) {
$('#addLineItemControlSection').jqmHide();
},
error: function (req, status, error) {
alert("Make sure that javascript is enabled on your browser");
}
});
});
Старый
data: "id=" + id1 + "&id1=" + id2 + "&message=" + msg,
New
data: {'id': id1 , 'id1': id2,'message':msg},