On a button click on my server side, I assign value to the Hidden Field from a column in my table.
Dim dsGetEnquiryDetails = dbl.usp_GetEnquiryRegisterDetails(Val(lblEnquiryRegisterID.Text)).AsQueryable
For Each record In dsGetEnquiryDetails
HiddenStatusFlag.Value = record.StatusFlag
Next
In my client side function I use this, but not getting any value.
var StatusFlag = '';
StatusFlag = document.getElementById('<%= HiddenStatusFlag.ClientID%>');
What am I missing?
alert(StatusFlag);
to see what the value is. If it's "null" I know I muffed the command. If it displays something like "[object HtmlInputElement]" I know I got the control instead of the property I intended. – IleumVisible
property must not be set tofalse
. Otherwise js can't see it. It will still be hidden. – Phelgon