Q:

Keep div displayed on postback

I have a web user control and a div inside it; some jQuery toggles div's visibility. There is also a asp:button that launches some server side code.
I need to restore div's visibility after postback.
I'm following the updated solution posted in the this post's solution. Here is my code:
At the top of the ascx, after the Registers:
<script>
function SetHiddenValue()
{        
   var campo = document.getElementById("<% =hidHiddenField.ClientID %>");
   if(campo.Value == "NO")
   {               
      document.getElementById("<% =hidHiddenField.ClientID %>").Value = "SI";  
   }
   else
   {
      document.getElementById("<% =hidHiddenField.ClientID %>").Value = "NO";
   }        
}
</script>

The div definition:
<div id="divContenidoMetricas" style='<%= DefinirVisibilidad() %>'>

In that same web user control:
<asp:ImageButton runat="server" ImageUrl="~/Themes/Images/buscar.PNG" OnClick="btnFiltrar_Click"
                    ID="btnFiltrar" OnClientClick="SetHiddenValue()" />

In the ascx.cs:
protected string DefinirVisibilidad()
{
   return this.hidHiddenField.Value == "SI" ? "display:block" : "display:none";
} 

It is just not working. hidHiddenField.Value arrives to the server code (DefinirVisibilidad()) with the same value all the times.
Thanks so much in advance for your help... my client side code knowledge is kind of damaged by ASP.NET so I'm stuck.
SOLVED
I replaced 'Value' with 'value' and that solved the problem. It's working!

A:

Value has to be lowercase, so it worked after replacing:
   if(campo.value == "NO")
   {               
      document.getElementById("<% =hidHiddenField.ClientID %>").value = "SI";  
   }
   else
   {
      document.getElementById("<% =hidHiddenField.ClientID %>").value = "NO";
   }   

