I am a little confused about the benefits or conc using scriptmanager with ajax calls or use JQuery to direct call webmethods.
Can some one give me some hints about this issue? when to use which? there is any different while dealing with JSON?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think the MSDN ScriptManager control page does a good job of summing up the features –
Essentially the ScriptManager does what it says, manages your scripts without too much concern on your part with writing the JavaScript "glue" to do it yourself.
Of course, there is (some might say significant) overhead to including the ScriptManager control, not least the amount of additional requests made for script resources and the size of the generated proxy classes to call web services and page methods. This may not be so important when developing an intranet application where bandwidth and network speed are likely to be less of a problem compared to developing an application for the internet, but it’s important to be aware of, nonetheless.
If you’re comfortable with a JavaScript library that is capable of replacing all features of the ScriptManager whilst also being lighter in weight and as fast to get things done, then that sounds like a good case to not use the ScriptManager.
In terms of dealing with JSON, both jQuery and the ScriptManager handle it fine. IIRC, JSON is the default data type for Page Methods and Web Services in .NET (although something is reminding me that this was not always the case).