hello.
this is a bug i found in the sequence of this bug:
http://forums.asp.net/thread/1254898.aspx
ok, so if you have a dataService that is calling a web service and you're not sending parameters, then there's a problem in the way the query string is built. for instance, i have this declaration on my page:
<dataSource id=
"mySource" autoLoad=
"true" serviceURL=
"WebService.asmx?mn=ObtemAlunos" serviceType=
"Handler" />
the problem is that i get a GET request with this url:
GET /codigo/cap06/WebService.asmx?mn=ObtemAlunos&
the problem is that the the Sys.Net.WebRequest.createUrl adds the url returned from the Sys.Net.WebRequest.createQueryString without checking for the length of the returned string. in my previous scenario, the _parameters object of the datasource class is created as an empty object (which is different from null) and due to that, the createQueryString is returning an empty string.
i think that the Sys.Net.WebRequest.createUrl should be changed so that it looks like this:
Sys.Net.WebRequest.createUrl = function(url, queryString) {
if (!queryString) {
return url;
}
var sep = '?';
if (url && url.indexOf('?') != -1)
sep = '&';
var string = Sys.Net.WebRequest.createQueryString(queryString);
if( string != null && string.length != 0 )
return url + sep + Sys.Net.WebRequest.createQueryString(queryString);
else
return url;
}
thanks.