Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Ajax JSON
Dear Experts,
 
I am in a little Trouble, I am doing an ASP.Net project, And in my project am using Ajax JSON for transfering the datas,
 
I have used this in lots of pages,
 
But in one page i have transferred 21 values through AJAX JSON, but something happend, its not working,
but it is working when i run project in VISUAL STUDIO, but it is not working when i published it in live server.
 
i have used this method in another page but it transferred only 2 values, it is working perfectly.
 
i have used the ajax code like this.... is it fine..???
 
 
$.ajax(
               {
                   type: "POST",                  
                   url: "StudentCreation.aspx/Save_Student",
                   dataType: "json",
                   data: JSON.stringify({
                       "Division_ID": _div_ID, "_FirstName": _FirstName, "_MiddleName": _MiddleName, "_LastName": _LastName,
                       "_Address": _Address,
                       "_Sex": _Sex,
                       "_DOB_Day": _DOB_Day,
                       "_DOB_Month": _DOB_Month,
                       "_DOB_Year": _DOB_Year,
                       "_Mobile1": _Mobile1,
                       "_Mobile2": _Mobile2,
                       "_Land_Line": _Land_Line,
                       "_PinCode": _PinCode,
                       "_Country_ID": _Country_ID,
                       "_State_ID": _State_ID,
                       "_State_Or_Province": _State_Or_Province,
                       "_Email": _Email,
                       "_Parent_Name": _Parent_Name,
                       "_Relation": _Relation,
                       "_Profile_PIC": _Profile_PIC,
                       "_UserName": _UserName
                   }),
                   contentType: "application/json; charset=utf-8",
                   success: function (json) {
 
                       if (json.d == 1) {
                           $.modal.alert("This User or UserID already Exists. Please Correct it.", { blocker: true });
                       }
                       else
                       {
					   alert("A");
                           startUploading();
                           
                           
                       }
                       
                       
 
                      
 
                   }
 
               });
 
 

 
Please Help me to solve this problem.
 
Thanks And Regards,
 
Dileep....
Posted 24-Apr-13 3:29am
dilzz1.2K
Edited 24-Apr-13 7:08am
v4
Comments
PRAKASH9 at 24-Apr-13 8:40am
   
use this may be help you
"<jsonserialization maxjsonlength="2147483644" > <jsonserialization >
dilzz at 24-Apr-13 8:42am
   
where i have used this code.?? can u please gimme me some examples...
 
Thank you
PRAKASH9 at 24-Apr-13 8:43am
   
in web.config

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

use like this in web.config
 
 
 <system.web.extensions>
    <scripting>
      <webservices>
        <jsonserialization maxjsonlength="2147483644" />
      </webservices>
    </scripting>
  </system.web.extensions>
  Permalink  
Comments
dilzz at 24-Apr-13 8:54am
   
Thank you sooo much sir....
 
Its working fine now... :)
PRAKASH9 at 24-Apr-13 8:56am
   
your welcome
dilzz at 24-Apr-13 11:44am
   
Sir, Its having some more problem,
Some times its working.. and sometimes its not working, When i put an alert before the ajax call then it is working.....
 
PLease help me...
 
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,800
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 24 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100