<script type="text/javascript>"
var browserCompatibility = document.documentMode;
document.getElementById("<%=hddnBrowserComp.ClientID %>").value = browserCompatibility;
alert(browserCompatibility);
</script>
I am facing an issue where the hidden field value (hddnBrowserComp) is not displaying on page load. How can I ensure that it is populated correctly?
C#
if(!IsPostBack)
{
string x ="";
x = hddnBrowserComp.Value.ToString();
}