O'Reilly logo

ASP.NET jQuery Cookbook - Second Edition by Sonal Aneel Allana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Selecting a control using HTML tag

This recipe demonstrates how to access ASP.NET controls using the corresponding HTML tag generated at runtime. We will demonstrate how to use the GridView control, which generates the table HTML tag. Each row of the GridView renders the tr HTML tag. This example uses the following constructs:

Construct

Type

Description

$("html_tag")

jQuery selector

This selects all elements with the specified HTML tag

$(this)

jQuery object

This refers to the current jQuery object

.addClass()

jQuery method

This adds the specified CSS class to each matched element

[attribute$="value"]

jQuery selector

This selects an element with the specified attribute, ending with the string "value"

:checkbox

jQuery ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required