Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0 ;. net CLR 1.1.4322 ;. net CLR 2.0.50727 ;. net CLR 3.0.04506.648 ;. net CLR 3.5.21022 ;. net CLR 3.0.20.6.2152 ;. net CLR 3.5.30729)
Timestamp: Mon, 14 Dec 2009 03:32:55 UTC
Message: SYS. argumenttypeexception: object of Type 'string' cannot be converted to type 'function '.
Parameter Name: onsuccess
Row: 4770
Character: 16
Code: 0
Uri: http: // localhost: 6388/webs/scriptresource. axd? D = d_Q0Ax-QZTcQtQQuRVnReSXMBgbLxa9q5v8DUZS_lb-grRlT4kz_QlCwFukd _ 2yg-agg-i8oiuslqy4iren3muq0qai5kofzpariipkpkq1 & t = 633958669188906250
The preceding error occurs when Ajax calls WebService. No answer was found online, and the reason is finally found today.
It's easy. When writing JavaScript Functions, do not write anything if there is no value passed in.
Correct syntax:
Function btngetdatatable_onclick () {userservice. listtestusers (onsucceeded, onfailed );}
Incorrect syntax:
Function btngetdatatable_onclick () {userservice. listtestusers ("", onsucceeded, onfailed );}
Having no theoretical experience is nothing more than an empty talk.