Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
This is my Jquery Method
 
var domain = $(domainId).parent().find("input[name$=whoisdomain]").val();
var params = "{domainname:'" + domain + "'}";
 
$.ajax({
                 type: 'POST',
				 url: '../SearchResult.aspx/GetResult',				 
                 contentType: 'application/json; charset=utf-8',
				 data: params,
                 dataType: 'json',
				 processData:true,
			     success: AjaxSucceeded,
                 error: AjaxFailed
             });  
 
Server side WebMethod Is:
 
[WebMethod]
       [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
       public static List<string> GetResult(string domainname)
       {
          //code is here
       }
 

 

 

 

ERROR IS:
 
{"Message":"Invalid web service call, missing value for parameter: \u0027domainname\u0027.","StackTrace":" at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
 

 
Plz tell me where is the error..this code work fine in all browers except Internet Explorer 10
Posted 12-Jun-13 20:06pm
Edited 12-Jun-13 20:26pm
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The data should be
var params = {"domainname":'" + domain + "'};
instead of
var params = "{domainname:'" + domain + "'}";
 
Hope this helps
  Permalink  
v2
Comments
RahulRana723 at 13-Jun-13 1:29am
   
sir,[domain] is variable.which is dynamic not static..i try ur solutions but not working
Jameel Moideen at 13-Jun-13 1:33am
   
Oops..I have updated my answer.Please try that
RahulRana723 at 13-Jun-13 1:37am
   
sorry sir,not working
Jameel Moideen at 13-Jun-13 1:40am
   
is it working in other browsers?
Jameel Moideen at 13-Jun-13 1:43am
   
can you remove the quotes like '" + domain + "' to {"domainname": domain};
RahulRana723 at 13-Jun-13 1:47am
   
Not working
RahulRana723 at 13-Jun-13 1:44am
   
var params = "{domainname:'" + domain + "'}";
This code working fine in all browsers
Jameel Moideen at 13-Jun-13 1:51am
   
did you try my last comment.
RahulRana723 at 13-Jun-13 1:53am
   
yes sir.not working in any browsers
ERROR:An error occur{"Message":"Invalid JSON primitive: domainname
Jameel Moideen at 13-Jun-13 1:54am
   
read the comments in this link.I think u got some information from this..http://stackoverflow.com/questions/16004853/pagemethods-in-ie-10-do-not-send-param-causing-errorinvalid-web-service-call
Jameel Moideen at 13-Jun-13 1:59am
   
I think it's a IE10 bug
RahulRana723 at 13-Jun-13 2:03am
   
whats's the solutions? urgently need.plz help
Jameel Moideen at 13-Jun-13 2:10am
   
http://community.codeontime.com/codeontime/topics/ie_bug_invalid_web_service_call_missing_value_for_parameter_controller_can_this_be_fixed
Jameel Moideen at 13-Jun-13 2:08am
   
I don't know exactly what's the pblm..Please read this http://community.codeontime.com/codeontime/topics/ie_bug_invalid_web_service_call_missing_value_for_parameter_controller_can_this_be_fixed
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hello,
 
Try to alert the value of domain .. may be there can be issue in getting domain value
 
var domain = $(domainId).parent().find("input[name$=whoisdomain]").val();
alert(domain);
 
Hope this helps...
  Permalink  
Comments
RahulRana723 at 13-Jun-13 3:02am
   
already try this..this working well

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 CPallini 155
3 PIEBALDconsult 150
4 BillWoodruff 148
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 13 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100