Labels

Thursday, March 29, 2007

Hide Error Label on Body On-Load.

Below sequence fires.

  • At first time 'onload="Hide()' hides the label.
  • When the button is clicked below event happens:
    • button_clientside_click :
    • Page_Load: Label gets Visible here using the declarative values.
    • Button_ServerSide_Click : Sleeps thread for 2 secs.
    • Page_PreRender
    • body_onload_clientside : This hides Label again by calling 'onload="Hide();'
    • Page_Render : Label gets In-Visible.
    • Page_Unload

Hence when the button is clicked you will see the label for a nano second and again it gets disappear.

// ------------------------------------------------
function Hide()
{
document.getElementById('Label1').style.display='none';
}

function UnHide()
{
document.getElementById('Label1').style.display='block';
}
// ------------------------------------------------

Hope it is Clear.



No comments:

Post a Comment