Webmethods
-
I'm trying to update a list on a app page using jquery and a webmethod to do so. when I do, I get a security validation error and the only solution I have found online is to turn off security validation for the site, which is something I don't want to do. I am calling my code behind method that inserts a cafeteria menu into the list with the following code:
PageMethods.AddNewMenu($("#theDate").val(), $("#<%= txtMenu.ClientID %>").val(), Success, Error);
On the backend I have a standard string function that inserts an item into the menu list. Of course, if I run this a standard post back it works fine, or if I run it using an asp.net update panel, but with that I can't get my jquery ui dialogs to work. Is there a way I can use the pagemethod/webmethod approach without having to turn off validation?