I have been implementing jQuery throughout our custom CRM at work. In the process, I create a border panel that has a simple button in the title that collapses or expands the content depending on the current state. Now, to remember the state of the panel, I use the jquery cookie library, which sets the cookie for this control when the page is sent, and then when the page reloads, it reads and resets the panel to its last state.
The problem was that jQuery executed when the page was submitted, since ASP.NET takes care of this and will not call the submit () function on the form. To overcome this, I found http://kenbrowning.blogspot.com/2009/01/supporting-jquerys-formsubmit-in-aspnet.html , which seemed to work almost flawlessly.
However ... After further testing, I found that this would prevent any callbacks that should occur in the UpdatePanel in order to make a full Postback, not Async, from one of the panels. I understand that UpdatePanels are a bit outdated now, but they are dotted all over the site, so in order to use this control, he will be pleased to work with them.
So, is there a way to determine if asynchronous feedback has occurred? Basically I want to be able to do something like this:
if (IsAsyncPostback) {
theForm.submit();
} else {
$(theForm).submit();
}
, . , , ?