All,
I have the follow page setup. A index.aspx page that has a user control
on it. Theres a button on the user control called Button1 when it is
clicked I would like to disable a button on the index page called
testb1.
I have tried the following from the ascx file.
protected void Button1_Click(object sender, EventArgs e)
{
Button B1 = (Button)Parent.Page.FindControl("testb1");
try
{
B1.Enabled = false;
}
catch (Exception objError){ }
}
testb1 is the name of the button on the index page.. Everytime I run
it, B1 is null.
Any ideas what Im doing wrong?
Thanks,
KC