Uncaught SyntaxError: Unexpected token < &mdash; in jQuery ajax

I am new to web service. In my project, I connected Web Service(everything is ready-made) now when I tried to run I got the below error.ERROR -->\[quote\] \[code\]Uncaught SyntaxError: Unexpected token <\[/code\]\[/quote\]The related code is as follows:jQuery\[code\] function GetAllCategories() { $.ajax({ url: "http://localhost:12015/myWebService.asmx?op=GetCategories", type: "POST", dataType: "jsonp", data: "{}", contentType: "application/jsonp; charset=utf-8", success: function (data) { var categories = data.d; $.each(categories, function (index, category) { alert(category.CategoryId); }); }, error: function (e) { alert(e.message); } });}\[/code\]Web Service\[code\][WebMethod][ScriptMethod(ResponseFormat = ResponseFormat.Json)]public List<Categories> GetCategories(){ //Code}\[/code\]Before asking here I have gone through this link(cant understand it)
 
Back
Top