asp.net 4.0

How to use a Where clause in SQL Select statements.

In many cases, the Where clause is the most important part of the Select statement. Web developer can find records that match several conditions using the And keyword, and he/she can find records that match any one of a series of conditions using the Or keyword. Web developer can also specify greater-than and less-than comparisons by using the …

Learn more

How to improve SQL Select statement

The following is an example of typical and inefficient Select statement. It works with the Clients table:

SELECT * FROM Clients

-The asterisk (*) retrieves all the columns in the table. This isn’t the best approach for a large table if a Web developer does not need all the information. It increases the amount of data that has to be …

Learn more

How to use SQL Select statement

Web developer can retrieve one or more rows of data, by using SQL select statement which has the following structure:

SELECT [columns]
FROM [tables]
WHERE [search_condition]
ORDER BY [order_expression ASC …

Learn more

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 the first …

Learn more

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 example the …

Learn more

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 with less …

Learn more

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 the page.

Web …

Learn more

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 is called …

Learn more

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 server and …

Learn more

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 one is …

Learn more