Question: ```
<tr id="trHdn">
<asp:hiddenfield runat="server" id="hdncontrol1" />
<asp:hiddenfield runat="server" id="hdncontrol2" />
</tr>

```

Need to write jQuery to update all hiddenfield values to '**true**' within tr '**trHdn**' in 1 line.

This is a page in asp.net Web Application

Answer: 
You can use the parent > child selector in jquery

```
$("#trHdn > input[type='hidden']").val('true');

```

It's worth noting that this only handles direct descendants of tr, if you have hidden fields nested deeper inside of a tr, then you may want to leave out the '>'

```
$("#trHdn input[type='hidden']").val('true');

```
```
$('#trHdn').find('input[type="hidden"]').val('true');

```

**Edit:** This is essentially the same as the accepted answer but for one important difference: It's a lot faster.

Why? jQuery selectors search from right to left. The accepted answer will search for all hidden inputs in the document, then eliminate those that aren't descendants of the element with id 'trHdn'. Chaining it the way I have, it first finds the element with id 'trHdn' and then searches its descendants for hidden inputs. If your document is big with a lot of script being processed, it could make a difference.