Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / December 2005

Tip: Looking for answers? Try searching our database.

Getting the currently loaded usercontrol's name?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Showjumper - 30 Dec 2005 22:10 GMT

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
Showjumper - 30 Dec 2005 22:14 GMT

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.

> 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
<ctacke/> - 31 Dec 2005 02:07 GMT
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

> 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
Showjumper - 31 Dec 2005 04:27 GMT

One question - what do i use for the sourcecontrol as in - public static
string GetControlName(object SourceControl)
thx

> 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
[quoted text clipped - 8 lines]
>> Thx
>> Ashok
<ctacke/> - 31 Dec 2005 12:46 GMT
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

> One question - what do i use for the sourcecontrol as in - public static
> string GetControlName(object SourceControl)
[quoted text clipped - 12 lines]
>>> Thx
>>> Ashok
Showjumper - 31 Dec 2005 14:55 GMT

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

> 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
[quoted text clipped - 18 lines]
>>>> Thx
>>>> Ashok

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.