Write trace warn (VB.net)
<%@ Page Language="VB" Trace="True" %>
<html>
<head>
<title>Tracing Sample</title>
<script runat="server">
Sub Page_Load()
If Page.Trace.IsEnabled = True Then
Trace.Write("MyCategory", "Hello, Trace!")
Trace.Warn("MyCategory", "This text will be red!")
Message.Text = "Tracing is enabled for this page."
Else
Message.Text = "Tracing is not enabled for this page."
End If
End Sub
</script>
</head>
<body>
<asp:label id="Message" runat="server"/>
</body>
</html>
Related examples in the same category