使用JQuery Ajax是否合适? [英] is it good to use JQuery Ajax

查看:76
本文介绍了使用JQuery Ajax是否合适?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们..



使用起来很好



JQuery ajax for many case'插入和更新记录......?



ex



客户端

 $。ajax({
url:' test。 aspx / update'
dataType: json
类型: POST
});



 [system.web.services.webmethod] 
public static string update()
{}





谢谢&问候,

Kanag。 M

解决方案

.ajax({
url:' test.aspx / update'
dataType: json
类型: POST
});



 [system.web.services.webmethod] 
公开 静态 字符串 update()
{}





谢谢&问候,

Kanag。 M


我正在使用带有议程的PageMethods来保存数据库中的约会,并且它运行良好。但是jQuery和JSON也可以工作。



客户端

 PageMethods.UpdateEventData(calEvent.id,calEvent) .title,startString,endString,calEvent.allDay,calEvent.backgroundColor); 



代码背后

 [WebMethod] 
public static int UpdateEventData( int id, string title, string start, string end, bool allDayEvent, string backgroundColor)
{
}


Dear folks..

Is it good to use

JQuery ajax for many case''s to inserting and updating records... ?

ex

client side

$.ajax({
url: 'test.aspx/update',
dataType: "json",
type:"POST"
});


in code behind

[system.web.services.webmethod]
public static string update()
{}



Thanks & Regards,
Kanag. M

解决方案

.ajax({ url: 'test.aspx/update', dataType: "json", type:"POST" });


in code behind

[system.web.services.webmethod]
public static string update()
{}



Thanks & Regards,
Kanag. M


I am using PageMethods with an agenda to save appointments in the database and it works very well. But jQuery and JSON also work.

client side

PageMethods.UpdateEventData(calEvent.id, calEvent.title, startString, endString, calEvent.allDay, calEvent.backgroundColor);


in code behind

[WebMethod]
public static int UpdateEventData(int id, string title, string start, string end, bool allDayEvent, string backgroundColor)
{
}


这篇关于使用JQuery Ajax是否合适?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆