Nub,
There are two different ways that might work best for you.
One would be to put the button in the user control itself. Then the button
click would go directly in the user control's code behind.
If the button has to exist on the page that the user control is contained in
you could use the FindControl method to access the user control.
Put the GetData() routine in your user control and declare the method as
public. Then inside of the button click routine find and cast the user
control something like this:
private void button1_click()
{
// i want to call GetData() that is in my user control.
MyUserControl userControlFound = (MyUserControl)
Page.FindControl("MyUserControlID");
MyUserControl.GetData();
}
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche