Hide .Net control? Options
umbracoNewb
Posted: Friday, August 29, 2008 3:40:36 PM
Rank: Enthusiast

Joined: 8/5/2008
Posts: 25
ok here's the story. I have a .Net control that i would like to use but only on certain pages, and here's the kicker. The .Net control is in the Site('Master') template. It is currently placed under the left side navigation and needs to stay there. I only want this .Net control to show up on a few pages but the left column needs to stay for every page. The question i have is "Is there any way to hide the control based on a page param or anything like that?". Any help is always appreciated.

Thanks

umbracoNewb
Dirk
Posted: Friday, August 29, 2008 3:55:20 PM

Rank: Addict

Joined: 9/27/2007
Posts: 977
Location: Belgium
Probably the worst hack I can come up with currently:

Create a public property on your .net control. Render the control based on the value for that param.
I agree, it's a willy hack, but if it serves your goal....

I might look into a more elegant solution... Perhaps...
Anyone else has a better idea?

Hope that helps.

Regards,
/Dirk


level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
darrenjferguson
Posted: Friday, August 29, 2008 4:34:05 PM

Rank: Fanatic

Joined: 3/19/2008
Posts: 219
Location: London, UK
Just have the contents of your control inside some kind of Panel and set the visibility property based upon the current request context....

Darren Ferguson - Umbraco level 2 certified
www.darren-ferguson.com - www.fergusonmoriyama.com
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.