<asp:HiddenField ID="hidden" runat="server" />
protected String LabelProperty
{
get
{
return hidden.Value;
}
set
{
hidden.Value = value;
}
}
<script>
function UpdateControl() {
document.getElementById('<%=hidden.ClientID %>').value = '12';
}
</script>
Now you can access the Property directly across the Postback
. The Label
Control updated value will be Lost across PostBack
in case it is being used directly in code behind .