Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function testAjax() {
- $.get("/Blog/getTestEntity", function(data) {
- alert(data.id + " " + data.text);
- });
- // $.ajax({
- // url: "/Blog/getTestEntity",
- // type: 'GET',
- // dataType: 'json',
- // contentType: 'application/json',
- // mimeType: 'application/json',
- // success: function(data) {
- // alert(data.id + " " + data.text);
- // },
- // error:function(data,status,er) {
- // alert("error: "+data+" status: "+status+" er:"+er);
- // }
- // });
- }
- function testAjax2() {
- $.post("/Blog/postTestEntity",
- {
- id: 4,
- text: "text"
- },
- function(data, status){
- alert("Data: " + data + "\nStatus: " + status);
- });
- // $.ajax({
- // url : "/Blog/setTestEntity",
- // type : 'POST',
- // data : "{\"id\":3,\"text\":\"3\"}",
- // dataType : 'json',
- // contentType : 'application/json',
- // mimeType : 'application/json',
- // success : function(data) {
- // alert(data.id + " " + data.text);
- // },
- // error : function(data, status, er) {
- // alert("error: " + data + " status: " + status + " er:" + er);
- // }
- // });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement