Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Dear folks..

Is it good to use

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

ex

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

in code behind
C#
[system.web.services.webmethod]
public static string update()
{}


Thanks & Regards,
Kanag. M
Posted
Updated 3-Dec-12 23:21pm
v2

1 solution

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
JavaScript
PageMethods.UpdateEventData(calEvent.id, calEvent.title, startString, endString, calEvent.allDay, calEvent.backgroundColor);

in code behind
C#
[WebMethod]
public static int UpdateEventData(int id, string title, string start, string end, bool allDayEvent, string backgroundColor)
{
}
 
Share this answer
 
v2
Comments
kanagmathes 4-Dec-12 8:56am    
Thanks..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900