Getting the currently loaded usercontrol's name?

  • Thread starter Thread starter Showjumper
  • Start date Start date
S

Showjumper

Is it possible to get the currently loaded usercontrols name? I found
<ctacke/> articles on get control name. Does it work for usercontrol names?

Thx
Ashok
 
I need to get th ename of the currently loaded control so i can turn it off
when the back is hit to go back to the treeview control.
 
Sure, it will work for any kind of control - though IIRC there's a bug in
the code I posted in my blog if the control is contained - you need to walk
down containers to make sure it's found.

-Chris
 
One question - what do i use for the sourcecontrol as in - public static
string GetControlName(object SourceControl)
thx
 
For GetControlNmae you pass in a control, it gives you back the string of
it's name. I also have GetControlByName, where you pass in the string name
and get back the Control.

-Chris
 
Not sure if your function will work for me. Bascially what i need to do is
find the currently loaded usercontrol and then turn it off. But w/ your
function i still have to pass in the control but i wont know the control. Do
i make any sense? If i click a child node, that control is loaded and
treview turned off. I then want to find that UC and turn it off and the
treeview back on when i hit the back button on the MainMenu. I have googled
but havent found anything so far that i think will answer my ?.

And Thanks go out to you and eveyone else that has answered my questions in
the last few days. Things are little different programmig CF compared to
ASP.NET.

Ashok
 
Back
Top