Home > Net >  The core asp.net ajax to submit the data from
The core asp.net ajax to submit the data from

Time:09-20


Don't know why I can't ajax submit the background from old fire ah ah

CodePudding user response:

Client, don't stick the, press F12 see if the request is normal

CodePudding user response:

What is the anwser? Is an object or a string?

CodePudding user response:

It should be in the right data: {data: answer},

CodePudding user response:


Is this

CodePudding user response:

If no json this key under application

CodePudding user response:

refer to the second floor by_ love reply:
anwser is what? Is an object or a string?

object

CodePudding user response:

You this is not in accordance with the routine come..

Pseudo code.

 
Public class a
{
Public string id {get; set; }
Public int the age {get; set; }
}
(a) [frombody] public ihttpactionresult XXX
{
}


 
Var data=https://bbs.csdn.net/topics/{a: "admin", b: 18};
$.post (" ", json stringify (data), function (result) {
});

CodePudding user response:

refer to 7th floor by_ love reply:
this also not according to routine. You.

Pseudo code.

 
Public class a
{
Public string id {get; set; }
Public int the age {get; set; }
}
(a) [frombody] public ihttpactionresult XXX
{
}


 
Var data=https://bbs.csdn.net/topics/{a: "admin", b: 18};
$.post (" ", json stringify (data), function (result) {
});

The parameter is empty submit path

CodePudding user response:

refer to the eighth floor qq_43305684 response:
Quote: refer to 7th floor by_ love reply:

You this is not in accordance with the routine come..

Pseudo code.

 
Public class a
{
Public string id {get; set; }
Public int the age {get; set; }
}
(a) [frombody] public ihttpactionresult XXX
{
}



 
Var data=https://bbs.csdn.net/topics/{a: "admin", b: 18};
$.post (" ", json stringify (data), function (result) {
});

The background how to

CodePudding user response:


Even the code is not running

CodePudding user response:

I'm a pseudo code...

Do you have a few mistake..

1 ` object you directly into your own objects don't get what jsonresult... You have several fields you can define several fields.


2 ` my post is short.. You can use your normal ajax. Will do.

CodePudding user response:

You try data: {', 'text'}
The passing of a single string, I don't remember clearly whether that is passed,
Of course, if you as a Model, need not so special,

CodePudding user response:

415 error

11 references by_ love reply:
I'm a pseudo code...

Do you have a few mistake..

1 ` object you directly into your own objects don't get what jsonresult... You have several fields you can define several fields.


2 ` my post is short.. You can use your normal ajax..

Thank you to solve the
  • Related