avoid viewstate when post using jquery
- by nisardotnet
how can i avoid or rather not send viewstate when i post from jquery?
i try to put on the .aspx EnableViewState="false" but has no effect...
here is how iam posting my page:
var json = "{'firstname':'" + escape(firstname.val()) + "','surname':'" + surname.val() + "','day_fi':'" + day_fi.val() + "'}";
var ajaxPage = "wizard_data_process.aspx?returnId=0";
var options =
{
type: "POST",
url: ajaxPage,
data: json,
contentType: "application/json;charset=utf-8",
dataType: "json",
async: false,
success: function(response) {
//alert("success: " + response);
},
error: function(msg) {
//alert("failed: " + msg);
}
};
any help?
Data sent to the server :
_EVENTTARGET=&_EVENTARGUMENT=&_VIEWSTATE=%2FwEPDwUKMTMyNDEzMjAzM2QYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFDGNieE5vTWlkTmFtZXiY9c%2FusiuXmmWoJcK9o1udk5EX&_EVENTVALIDATION=%2FwEWKAL9rv3PAgK5h62pDwKnq8goAo%2BUwaAKAp2VxakCAtyNr8EIAr%2Fiza4EAtKQxe0HAtKQ4e0HAoDiza4EAoTfzqgFAumw5MYJAt%2Bw5MYJAofGq70JArr1ub4HAuKw5MYJAqfRtpcOArS3qtYNAtfYgLgBAu7YgLgBAu%2Bnq4AOAr2l1I8JAoz6iM8PAv2zgs4HAuXbmvMCAum1prUBApuktpcOApXyjvkGAuWixvECApSOke8IAt%2F1gtUKAsK1%2BeEBArKpwL0FAvfnuc0BAtb3964NAq%2Bm6rYIAvK94JEPAqCg9ZcMApmw76wEAsSXxu0O%2B%2F2DDTg9otIrNrwvY0ugwxYyULA%3D&txtFirstName=asdf&txtMiddleName=&txtLastName=&ddlSalutation=&ddlSuffix=&txtEmailAddress=&ddlGender=&txtDateOfBirth=&MaskedEditExtender1_ClientState=&ddlCountryOfBirth=&CascadingDropDown1_ClientState=%3A%3A%3A&ddlStateOfBirth=&CascadingDropDown2_ClientState=%3A%3A%3A&txtCityofBirth=&day_fi=DD&month_fi=MM&year_fi=YYYY&lastFour_fi=XXXX&countryPrefix_fi=%2B358&areaCode_fi=&phoneNumber_fi=&email_fi=nisarkhan%40hotmail.com&username=&password=&retypePassword=&hiddenInputToUpdateATBuffer_CommonToolkitScripts=0