How to use jQuery to manipulate the DOM elements

Web developer can manipulate the DOM, by modifying object of the page. He/she can add or remove the element; add, modify, or remove an attribute; and so on.  For example the code:

$(“#tree li:first > ul”).append($(“<li>”).html(“last node”));

retrieves the element to which the new element must be added. First the query gets the tree element; then it takes […]

How to use jQuery to manipulate the DOM attributes

Web developer can manipulate the DOM, by modifying object of the page. He/she can add or remove the element; add, modify, or remove an attribute; and so on.

Web developer can use the attr method to add or modify the attribute. If the attribute exists, the method doesn’t write it again, but modifies the existing one. For […]

How to use jQuery to handle the Page Load event

Web developer can use the Application object to execute some code when the page is loaded in ASP.NET Ajax. In jQuery, Web developer can write a method and then pass it to the $ method:

$( func() {
alert (“Page loaded”);
});

Web developer can put any logic inside the method. By using jQuery Web developer gets the same result […]

How to use jQuery methods to examine the DOM

Sometimes Web developer needs to receive an object and to find all the spans inside it. The best way to find items is to wrap the object inside a jQuery object and then use the find method to pass in a string query:

$(obj).find(“span”);

If obj is the JavaScript document object, this statement retrieves all the spans in […]

How to use jQuery to examine the DOM

At the base of jQuery is the $ character which is a method. The $ method is the entry point for all jQuery features. When the browser receives HTML, the browser parses it and renders it on screen. During parsing, it also creates an internal representation of the controls and organizes them hierarchically. This internal representation […]

How to intersect client-side pipeline

The ASP.NET Ajax framework has a server control named UpdateProgress and it can be used to define an HTML template that shows a wait message while the Ajax PostBack is being processed on the server. To do that, the control injects JavaScript code on the page that shows the HTML template before the call to the […]

How to optimize a page with multiple Ajax Update Panels

Note: Please read first the article How to optimize Ajax partial rendering.

By default, the server sends the HTML for the all UpdatePanels, which are used for Ajax partial rendering, in the page to the client. If the page has two UpdatePanels and when a button is clicked in the first one, a value in the second […]

How to optimize Ajax partial rendering

Note: Please read first one of the articles How to use Ajax partial rendering in VB.NET and How to use Ajax partial rendering in C#

The traffic between the client and server when UpdatePanel is used can be optimized and the server will send HTML to the client for only the first drop-down list. By default, […]

How to use Ajax partial rendering in VB.NET

Let start with a classical example – Web developer works under application which has a Web page with two drop-down lists. The first one contains all the cities in the country, and the second one contains the bank branches locations in the selected city. Web developer needs to populate the second drop-down list with the correct […]

How to use Ajax partial rendering in C#

Let start with a classical example – Web developer works under application which has a Web page with two drop-down lists. The first one contains all the cities in the country, and the second one contains the bank branches locations in the selected city. Web developer needs to populate the second drop-down list with the correct […]

Recommended ASP.NET Examples