Upgraded to .NET 3.5 ... AJAX totally *****ed. At wits end

J

Jethro

Right, had to manually upgrade a website to .NET 3.5, from .NET 2.0

made changes to web config to use newer versions of AJAX. Struggled
through loads of articles hinting that the upgrade was not a good
idea :-( In the end I had to create a directory structure in my app to
hold the .js files ..
so its includes\system.web.extensions\3.5.0.0\3.3.5.30729.196 (I also
had to add a 3.5.30729.1 directory, as for some reason my Server2003
machine has a different idea of what DLLs it's using, even though both
it, and my development machine are allegedly .NET 3.5SP1).

So now, it seems AJAX is working ... until I try an use functions
which call webservices ... at which point I am flummoxed. I have
debugged through, and the javascript is running. However, for some
reason, the following code is failing

ClearDropDown(getObj.lstFTOccupations);
for (var i=0; i< arg.length;i++){
var mylist = arg.split(':');
addOccupations(getObj.lstFTOccupations,mylist[1],mylist[0]);
}

because there appears to be no value for "arg.length". Instead, in the
debugger I see this sub-object called "d", which contains all the
items. But no .length property ...

can ANYONE explain wtf is going on, please ...

thanks in advance
 
P

Patrice

However, for some
reason, the following code is failing

ClearDropDown(getObj.lstFTOccupations);
for (var i=0; i< arg.length;i++){
var mylist = arg.split(':');
addOccupations(getObj.lstFTOccupations,mylist[1],mylist[0]);
}

because there appears to be no value for "arg.length". Instead, in the
debugger I see this sub-object called "d", which contains all the
items.


So the problem seems in how arg is build... Where does it come from ? From a
web service using LINQ ?
 
B

bruce barker

for security reasons the json returned from a .net json is wrapped in a
{d:{responseObject...}}. you don't show you webservice call or
deserialization step, so its hard to know what you are doing.

if you used the javascript wrapper generated by the .net webservice, it
does this for you.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top