Live Chat Icon For mobile
Live Chat Icon

How can I use Tracing in Custom Components?

Platform: ASP.NET| Category : Custom Controls, Error Handling

In Custom Components, you can use tracing if you reference the System.Web namespace and use the HttpContext.Current object to get a reference to the current context.


System.Web.HttpContext.Current.Trace('xxx', 'Message')


System.Web.HttpContext.Current.Trace('xxx', 'Message');

Also make sure to set the following directives:

For Page Level Tracing set Page Directive as

<%@ Page Trace='true' %>

For Application Level Tracing modify corresponding web.config as

        <trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.