How to Call a User Control's Methods?

  • Thread starter Thread starter jimfkennedy
  • Start date Start date
J

jimfkennedy

Hi,

I have a User Control dynamically loaded into a placeholder on my
webform. It contains a method, that I would like to call from the web
form? How can I do this?

Thanks,

Jim.
 
Hi, I can't seem to get any of the solutions provided in your tutorial
to work? I have a user control containing a public method.

I would like to call this method from the web form that dynamically puts
the control into a placeholder.

The two lines of code you seem to be saying do the job are:

5: Results r = (Results)Page.LoadControl("Results.ascx");
6: r.Info = SomeBusinessLayer.GetAllResults(); //valid

???

Any extra help on how I can achieve this would be much appreiciated....

Jim
 
Back
Top