本文介绍了Ajax请求从服务中获取其他记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi,
I have defined data parameters of AJAX request as follows
"{"take":200,"reportId":"D:\\Sample\\Listbox sample\\DashboardServiceInstaller\\DashboardServiceInstaller\\DashboardServiceInstaller\\listbox sample.sydx","controlId":"ListBox_1","masterData":"[{\"Key\":\"ListBox_1\",\"Value\":[{\"Items\":[]}],\"MultiSelection\":false,\"Filter\":\"Exclude\"}]","rangeData":"[]","modifiedConnectionStrings":"\"\"","listboxRowCount":"1096","currentUser":"null","isPublic":false,"skip":800}"
and ajax request is defined as follows
$.ajax({
beforeSend : ()
cache : true
contentType : "application/json; charset=utf-8"
crossDomain : undefined
data: "{"take":200,"reportId":"D:\\Sample\\Listbox sample\\DashboardServiceInstaller\\DashboardServiceInstaller\\DashboardServiceInstaller\\listbox sample.sydx","controlId":"ListBox_1","masterData":"[{\"Key\":\"ListBox_1\",\"Value\":[{\"Items\":[]}],\"MultiSelection\":false,\"Filter\":\"Exclude\"}]","rangeData":"[]","modifiedConnectionStrings":"\"\"","listboxRowCount":"1096","currentUser":"null","isPublic":false,"skip":800}"
dataType : "json"
ejPvtData : Object
error : ()
jsonp : "callback"
processData : false
success : ()
type : "POST"
url : "http://localhost:3002/DashboardService.svc/GetListBoxRows"
})
Once ajax request raise to the service, the request url and Request Payload as follows
> Request URL:http://localhost:3002/DashboardService.svc/GetListBoxRows
and Request Payload
> 1. controlID : "ListBox_1"
> 2. currentUser:"null"
> 3. isPublic:false
> 4. listboxRowCount:"1096"
> 5. masterData:"[{"Key":"ListBox_1","Value":[{"Items":[]}],"MultiSelection":false,"Filter":"Exclude"}]"
> 6. modifiedConnectionStrings:""""
> 7. rangeData:"[]"
> 8. reportId:"D:\Sample\Listbox sample\DashboardServiceInstaller\DashboardServiceInstaller\DashboardServiceInstaller\listbox
> sample.sydx"
> 9. skip:600
> 10. take:200
我尝试过:
What I have tried:
My requirement : I need to fetch the 200 records only from the service but it has fetching 201 records, even though i defined take 200.
> data.d Array[201] [0 … 99] [100 … 199] 200 : Object
Length is 201
Why i am getting additional data, is there any way to fix this issue.
推荐答案
我尝试过:
What I have tried:
My requirement : I need to fetch the 200 records only from the service but it has fetching 201 records, even though i defined take 200.
> data.d Array[201] [0 … 99] [100 … 199] 200 : Object
Length is 201
Why i am getting additional data, is there any way to fix this issue.
这篇关于Ajax请求从服务中获取其他记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!