Introduction:
Description:
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.
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.
To
get hidden field values from gridview we need to write the codesnippet like as
shown below
Get hidden field values from asp.net gridview
using jQuery
<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>
|
If
you want know the complete source code please check below post
jQuery Get Selected Row Values from Asp.net Gridview on Checkbox Selection |
Above post will explain clearly how to save values in hidden field
variable and how to get hidden field values from gridview in JQuery.
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. |
|||
|
|||
2 comments :
Thank you so much. saved me loads of time :)
Difference between hidden field values and view state... why it is used
Note: Only a member of this blog may post a comment.