Div tag

J

Jim Heavey

Someone told me that I could create a "Div" tag with a "runat='Server'" and
use it to surround all of the controls that I want to make
Visible/Invisible.

When I attempt to add the attribute of "Visible=" I get a compile error.
So is there an easy way to turn off all of these controls without having to
specify each of the controls in code?

Maybe I could use a for-each, but I am not quite sure how to do this. Any
suggestions...?

Thanks in advance for your assistance!!!!!!!!!!!!
 
J

John Timney \(Microsoft MVP\)

use a panel control

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
 
R

Raterus

or you could use an <asp:panel> control (which renders into a div tag), and
set the visible property of that to false. that way the hidden parts of the
page is never send to the client
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top