In previous posts I explained Bind Gridview with datareader, send gridview as mail body, Highlight gridview row when checkbox selected and many articles relating to Gridview, JQuery, etc. Now I will explain how to get gridview hidden field values using JQuery in asp.net.
<script type="text/javascript">
$(document).ready(function()
{
var hdntxt = '';
$("input[name$=chkChild]:checked").each(function() {
// Get Hidden Field Value from
Gridview
hdntxt += ","
+ $(this).next("input[name$=hdnId]").val()
});
$('#lbltxt').text(hdntxt)
});
</script>
|
jQuery Get Selected Row Values from Asp.net Gridview on Checkbox Selection |
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
|
Subscribe by RSS
Subscribe by Email
2 comments :
Thank you so much. saved me loads of time :)
Difference between hidden field values and view state... why it is used