Context.Trace.IsEnabled
<%@ Page Language="vb" Trace="True" %> <html> <head> <script runat="server"> Sub Page_Load() Message.Text = "Trace Enabled? " _ & Context.Trace.IsEnabled End Sub </script> </head> <body> <asp:label id="Message" runat="server"/> </body> </html>