Я столкнулся с проблемой здесь, я действительно не мог найти способ удалить значения моего следующего объекта JSON в веб-методе
Код ASPX
$(document).ready(function () {
// Add the page method call as an onclick handler for the div.
$("#Button1").click(function () {
$.ajax({
type: "POST",
url: "Default.aspx/MethodCall",
data: '{
«Вызов»: '{ «Тип»: «U», «Параметры»: [ { «Имя»: «Джон», «Должность»: «Технический директор» } ] } }', contentType: «application/json; charset =utf-8", тип данных: "json", кеш: правда,
success: function (msg) {
// Replace the div's content with the page method's return.
$("#Result").text(msg.d);
},
error: function (xhr, status, error) {
// Display a generic error for now.
var err = eval("(" + xhr.responseText + ")");
alert(err.Message);
}
});
});
});
Код ASPX.CS
[WebMethod]
public static string MethodCall(JObject Call)
{
return "Type of call :"+ Call.Type + "Name is :" + Call.Params.Name + "Position is :"
Call.Params.Position ;
}
заранее большое спасибо.