Commenting Out Server Controls

posted on 2004-11-30 at 00:43:24 by Joel Ross

Every now and then, I have a need to remove a server control from a page. Before, I either set it to be invisible, but that sometimes has side effects. So then I would remove it, but that also had it's downsides.

So that's why it was nice to see Jeffrey Palermo's post about commenting out server controls. It's a lot like HTML comments, but you use the % instead of !, like so:

<%--<asp:TextBox id="MyTB" runat="server">--%>

Categories: ASP.NET