Why I was unable to hide the previous button in the following code ?
private void ButtonClick(Obj ect sender, System.EventArg s e)
{
Button button = (Button)sender;
Button previousButton = (Button)Session["previousButton "];
if( previousButton == null )
{
// keep the first button
previousButton = button;
Session["previousButton "] = previousButton;
}
else
{
// Hide both button
button.Visible = false;
previousButton. Visible = false; // E R R O R don't work
previousButton = null;
Session["previousButton "] = previousButton;
}
}
Thank's
Marc