Usercontrol methods

  • Thread starter Thread starter Joe Molloy
  • Start date Start date
J

Joe Molloy

Hi,

I have a usercontrol containing mutually exclusive radiobuttons and I am
trying to use a public function to set a property of the usercontrol based
on which one is checked. However when I refer to the radiobuttons in my
public function (method) the runtime tells me that no object reference has
been set for the radiobutton. How do I grab a reference to my radiobutton
inside my method?

Joe
 
Hi,

Thanks for the quick response - the problem isn't accessing the properties
of the usercontrol - I have figured out how to do that.

What I want to do is call a method of the user control (which I've figured
out how to do) and execute some code in this method that will allow me to
access the checked value of a radiobutton in the user control.and set a
usercontrol property based on the returned value of the radiobutton. I am
having problems referencing the radiobutton to check it's checked value.

Joe
 
Hey,

Well if you have figured out how to execute the method on your user control
you should be fine.
ie the method belongs to ascx class and it shouldnt have any problems
accessing the child controls within.

HD
 
Back
Top