2

I have been reading this article:

Many ways to communicate with your database using jQuery AJAX and ASP.NET

This article describes many ways to communicate with the database using jQuery and AJAX. Personally I use .ASHX handlers to get the data.

Can any one tell me which way considered the best in terms of being lightweight and performing well no matter how large the database is?

1 Answer 1

2

If you're stuck with ASP.NET forms and aren't able to utilise ASP.NET MVC then .ashx handlers will be fine. They don't have all of the overhead of the full ASP.NET forms .aspx page.

As far as performance is concerned, as always, you should only return the data you need and provided your database is tuned and your SQL queries are sensible then life will be good.

One thing I would suggest is instead of returning HTML, consider returning data as JSON. It's more compact and portable. Also JSON objects rehydrate into javascript objects that you can manipulate directly. There are many JSON serialisers available for .NET, I consider Json.NET to be one of the better ones.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.