put two click events separate and call a function from both..
like button_Click
{ Button button = (Button)sender;
myfunction(button); }
button1_Click
{ Button button = (Button)sender; my function(button); }
protected void myfunction(Button button)
{ if (button.ID == "Options1")
{ Panel1.Visible = false; Panel2.Visible = true; }
else if
(button.ID == "Options2")
{ Panel1.Visible = true; Panel2.Visible = false; }
else
{
}