View Single Post
  #2 (permalink)  
Old March 3rd, 2009, 10:22 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

If it's just a <div /> element, you can add a Runat="server" attribute to have the div run at the server. This in turn allows you to hide it:

<div id="contact1" runat="server">
Some content here
</div>

Now you can set its Visible property....

Alternatively, you can use an asp:Panel instead of a <div> as a Panel renders as a div element in the browser.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote