Last active
August 29, 2015 14:01
-
-
Save jasonyost/454be8dfeb9fa094ba8b to your computer and use it in GitHub Desktop.
ASP.NET jQuery POST exclude ViewState
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// POST all the datas! except the ViewState | |
jQuery.post('https://www.example.com', jQuery("#form :not(#__VIEWSTATE) > :input").serialize() ,function(data,status){ | |
if(data[0]["Status"] == "Success"){ | |
jQuery("#poststatus").html("Thank you!"); | |
}else{ | |
jQuery("#poststatus").html("There has been an error while accepting your submission. Please contact us."); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment