All Comments
TopTalkedBooks posted at August 20, 2017

Stay away from the UpdatePanel concept all together.

ASP.NET MVC includes jQuery, which is fully supported by Microsoft now. You will want to create partial views (RenderPartial) that make calls back to a method on a controller, that returns JSON.

Then, use jQuery to wire up the control and partial views.

jQuery is an extremely powerful javascript library. I highly recommend the book jQuery in Action as a reference when diving into the ASP.NET MVC /Scripts/jquery-x.x.x.js files. :)

TopTalkedBooks posted at August 20, 2017

Chapter 7 of JQuery in Action is "Extending JQuery with custom Plugins" and should provide you with the information you need.

TopTalkedBooks posted at August 20, 2017

Rick Strahl and Matt Berseth's blogs both tipped me into jQuery and man am I glad they did. jQuery completely changes a) your client programming perspective, b) the grief it causes it you, and c) how much fun it can be!

I used the book jQuery in Action (I bought it used at Amazon for about $22). It has been a big help into bootstrapping me into jQuery. The documentation at are also very helpful.

A place where jQuery falls a little flat is with its UI components. Those don't seem to be quite ready for primetime just yet.

It could be that Prototype or MooTools or ExtJS are as good as jQuery. But for me, jQuery seems to have a little more momentum behind it right now and that counts for something for me.

Check jQuery out. It is very cool!

TopTalkedBooks posted at August 20, 2017

Your actual problem is that you don't know how to process the JSON string in the client side. I strongly suggest to use jQuery for this since this simplifies DOM manipulation a lot. I suggest to go through their tutorials or go get a decent book on the subject.

For the jQuery + JSON + Servlet + HTML table mix, I've posted similar answers before here and here with code examples how to populate a table with help of Google Gson and a Servlet, you may find it useful. I'll copypaste from one of them.

Here are the Servlet and the Javabean:

public class JsonServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<Data> list = dataDAO.list();
        response.getWriter().write(new Gson().toJson(list));

public class Data {
    private Long id;
    private String name;
    private Integer value;
    // Add/generate getters/setters.

The JsonServlet (you may name it whatever you want, this is just a basic example) should be mapped in web.xml on a known url-pattern, let's use /json in this example. The class Data just represents one row of your HTML table (and the database table).

Now, here's how you can load a table with help of jQuery.getJSON:

$.getJSON("", function(list) {
    var table = $('#tableid');
    $.each(list, function(index, data) {

The tableid of course denotes the idof the HTML <table> element in question.

<table id="tableId"></table>

That should be it. After all it's fairly simple, believe me. Good luck.

TopTalkedBooks posted at August 20, 2017

At the jQuery's homepage you can find several tutorials.

Further on there are books written about jQuery. The one I can recommend is the jQuery in Action. It's a pleasant read.

Here's a showcase of sites which use jQuery:

Here are more topics about the subject:
Where can I find a tutorial to get started learning jQuery?
Where can I learn jQuery? Is it worth it?

TopTalkedBooks posted at August 20, 2017

I'm currently reading jQuery In Action and I find it easy to read with great examples.

There are other questions on SO that provide many other resources.
jQuery & ASP.Net Resources & Gotchas

TopTalkedBooks posted at August 20, 2017

Unobtrusive JavaScript is the main driver for separating JS code from markup

  • Separation of functionality (the "behavior layer") from a Web page's
    structure/content and presentation
  • Best practices to avoid the problems of traditional JavaScript programming (such as browser inconsistencies and lack of scalability)
  • Progressive enhancement to support user agents that may not support
    advanced JavaScript functionality

With the code in document.ready, it will not execute until the DOM has loaded and before the page contents are loaded

From Learning jQuery

With $(document).ready(), you can get your events to load or fire or whatever you want them to do before the window loads.

You may want to take a look at jQuery in Action, I'd highly recommend it. You can sample Chapter 1 and Chapter 5 on the book's homepage. I think doing so may provide further insight into why separation can work well.

Finally, have a look at this question which has answers that detail how you would find the event listeners on a DOM node.


Some thoughts which may persuade you why unobtrusive JavaScript can be a good idea.

Imagine that you have a function bound as an event handler for the same event raised on each of a number of elements -

  • Would it be easier to find out which elements call that function to handle an event when the declaration is inline in each element, or the declaration is in one place, outside of the markup?

  • What if you want to add to the elements that call that function when the event is raised on each of them? Would it be easier/better to add the event handler inline to each element or to change the code in one place?

Top Books
We collected top books from hacker news, stack overflow, Reddit, which are recommended by amazing people.