Thursday, 22 August 2013

Calling a method from one class in another.

Calling a method from one class in another.

I have a parent page that has a RadTabStrip on it. On the TabClick event I
want to call a function from one of the tabs(child page). On the child
page I will be setting a control to visible=false; I will let the child
page handle the control handling I just need to call it in my parent page
because both tabs are being rendered at once so when I switch from tab to
tab it doesn't see that its on a page load so it wont try to make the
panel visible=false;
This is the Parent Page.
public void Page_Load(object sender, EventArgs e)
{
// call controls_confgMangrEvntNotif_confgMngrTab1.Test();
}
This is the child page and the meth I wish to call.
public partial class controls_confgMangrEvntNotif_confgMngrTab1 :
System.Web.UI.UserControl
{
public static void Test()
{
Debug.WriteLine("test");
}
I believe my current problem is do to access modifiers. If I do the name
of the class . it will give me a hashtable I made public static but no
other functions or variables.

No comments:

Post a Comment