?

Log in

Previous Entry | Next Entry

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: -

Copy right www.questpond.com

Buy 600+ Real Time Interview Videos

Call +91-22-66752917 or mail us on questpond@questpond.com for more details on C#, .NET, ASP.NET, SQL Server interview question videos.

SQL Server interview question videos

Latest Month

March 2017
S M T W T F S
   1234
567891011
12131415161718
19202122232425
262728293031 

Tags

Powered by LiveJournal.com