IF YOU WANT TO SEND THE DATA USING GET IN $.AJAX
=================================================
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare,UriTemplate="nextqtn/{qtno}")]
List<getjson> nextqtn(string qtno);
UNDER.ASPX
============
$.ajax({
http://192.168.1.9:150/Service.svc/nextqtn/" + id + "",
type: "GET",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
processdata: true,
success: function (msg) {
count = parseInt(msg);
},
Error: function (msg) {
}
});
=================================================
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare,UriTemplate="nextqtn/{qtno}")]
List<getjson> nextqtn(string qtno);
UNDER.ASPX
============
$.ajax({
http://192.168.1.9:150/Service.svc/nextqtn/" + id + "",
type: "GET",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
processdata: true,
success: function (msg) {
count = parseInt(msg);
},
Error: function (msg) {
}
});
No comments:
Post a Comment