$.ajax({
type: 'POST',
url: './SayfaAdi.aspx/FonksiyonAdi',
data: '{ KullaniciAdi:"Yigit" }',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (result) {
alert(result.d);
},
error: function (e) {
alert('Hata Oluştu');
}
});
Sunucu tarafında sayfanın kod kısmında yer alan kod parçacığı aşağıdaki gibidir.
[System.Web.Services.WebMethod]
public static string FonksiyonAdi(string KullaniciAdi)
{
return "YOLCU";
}
No comments:
Post a Comment