There are a couple of ways to do this, but if you want to do it in page_load then you will have to expose the property of the button to the page:
MyControl.ascx.cs
public partial class MyControl: UserControl
{
public bool MyButtonVisibility
{
set{ MyButton.Visible = value; }
}
}
MyPage.aspx.cs
public partial class MyPage: Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(condition)
MyControl1.MyButtonVisibility = false;
}
}
Hope that helps ^_^
Andy