How to Get Hidden Values from ASP.NET using JQuery

This article will explain how you can get hidden values in ASP.NET Gridview using JQuery. Do you want to know whether developers have hidden values in your Gridview or would you want to hide values to the Gridview? This article will get you what you want. All you need is to write this code snippet in 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>

 

Of course, this is just a part of the entire code. Read and understand what it means before you proceed in downloading the source code here: http://www.aspdotnet-suresh.com/2012/10/get-hidden-field-values-from-aspnet.html.

Leave a Reply

Your email address will not be published. Required fields are marked *