When using jQuery data for POST on the server, I get strange behavior.
If I include __VIEWSTATE and __EVENTVALIDATION in my data as a serialized form, the IsPostback page variable is set to true; if I exclude these two, IsPostback is set to false.
Is it easy for me to include these two variables, but does anyone know what is going on behind the scenes?
One of the things on which the viewstate and eventvalidation is tracked is whether a postback has occurred. Given the life cycle of an event-based ASP.NET page, there is no other way to keep track of whether a callback has occurred than simply saving the value somewhere.
In other words, you can manually check the feedback by digging into the viewstate object and detecting the postback logic and changing it to true. This may not be as described, but it emphasizes what happens inside the viewstate a little better.
IsPostBack() , , __VIEWSTATE __EVENTVALIDATION . , , , , , HTTP- POST GET, ( , viewstate eventvalidation ( ) string, IsPostBack()
? , , , , , -, IsPostBack .
"postback" jquery, __VIEWSTATE __EVENTVALIDATION. , ASP.NET WebForms . , , WebForms.
Source: https://habr.com/ru/post/1709570/More articles:How to store raw binary data hashes in MySQL? - phpWhat are the pros and cons of Git and Hg Version Control System? - gitAutomatically using table foreign key constraints - .netIs there a way in Linq to apply different calculations based on different conditions - c #Where to download the assembly containing NHibernate.Caches.Prevalence.PrevalenceCacheProvider, NHibernate.Caches.Prevalence? - cachingC - Неправильная комбинация указателя/целого в strftime() - cHow to save html while parsing xml using jQuery - jqueryTransferring data between sqlite databases - linuxHow to make mysql accept external connections - mysqlThe recommended return type for a web service that returns nothing (called with jquery) - jsonAll Articles