in CodeBehind create the simplest
private static int counter = 0;
Checking the IsPostBack property you can
if (Page.IsPostBack) counter++;
Where you want
Button1.Enabled = (counter<4);
I suggest increasing the counter in the Button1_Click event
source share