Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A
dotnetinter

.NET AJAX JQuery interview questions: - What is $.Ajax in jQuery?

It allows us to invoke server side functionalities asynchronously. It internally uses XmlHttpRequest.

What kind of requests we can make using $.ajax?

We can make any request like get, post, put and delete. $.ajax function accepts parameters called type which will decide what request we want do.

What is the difference between $.ajax and $.post?

  • $.post is simpler representation of $.ajax for POST requests. When we are using $.posits not required to specify the type. It will be always ‘post’.

  • If you are willing to make a post request and we expecting have more control over HTTP headers. $.ajax is the best choice. If your only invention is to make a post hit to server $.post is best.

What is the difference between contenttype and datatype in $.ajax?

ContentType represents the data type of data we are going to send from Javascrip whereas datatype represent the data type of data we are expecting from Serverside in return.

What is $.getJSON in jQuery?

It is just shorthand representation of $.ajax where type is set to “GET” and datatype is set to “JSON” automatically.

For technical trainings on various topics like WCF, MVC, Business Intelligence, Design Patterns, WPF, TFS and Basic fundamentals feel free to contact SukeshMarla@Gmail.com or visit www.sukesh-marla.com

For more stuff like this, click here. Subscribe to article updates or follow at twitter @SukeshMarla

See .NET AJAX jQuery interview questions video on explaining jQuery with example: -

Tags: $, $.ajax, $.getjson, .net, .net ajax jquery interview questions, ajax, csharp interview questions, it interview questions with answers, jquery, json, programming interview questions
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments