I take it you say "scattered" because you can't just put them in a
placeholder and set IT's visibility...
There actually is a really good and simple solution to this, create a custom
server control, who's logic is to determine whether it's visible or not.
For example, if you don't want a textbox to be displayed if the current user
doesn't had "Write" mode, you would do:
public class WriteTextBox : TextBox //stupid name
{
public override Render(HtmlTextWriter writer)
{
if ( ! User.CurrentUser.InInRole("Write")
{
Visibible = false;
}
}
}
the above code is fictional, but that's how I'd approach it...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"darrel" <no*****@hotmail.com> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl...
When showing/hiding items on the front end via codebehind, one normally
just
sets the object to runat='server' and then set's its visibility to false.
This works fine. However, when I have a 'set' of items that are scattered
all around the page, having to explicitely set each individual item to
true/false can get a bit tedious. Is there a more efficient method for
hiding a variety of items at once?
I can do this via javascript if I set each object's class the same and
then
reference that, but I'd rather control this server side.
-Darrel