Can't get Trace to work when used in .cs class

  • Thread starter Thread starter Joe Rattz
  • Start date Start date
J

Joe Rattz

I can get the Trace.Write() to work if I put the code in
an aspx.cs file. But, I have a (C#) class called by my
aspx.cs code that also has Trace messages, but none of
them show up in the Trace file, Trace.axd. Does anyone
know why?

Thanks.
 
Joe Rattz said:
I can get the Trace.Write() to work if I put the code in
an aspx.cs file. But, I have a (C#) class called by my
aspx.cs code that also has Trace messages, but none of
them show up in the Trace file, Trace.axd. Does anyone
know why?

Probably because your .cs file is using System.Diagnostics.Trace.Write?

Try passing the Page.Trace object to your methods in the C# class.
 
Probably because your .cs file is using
System.Diagnostics.Trace.Write?

Yes, it is. Well, where is it writing the trace at? It
doesn't throw an exception so it must be a legitimate
Trace object, correct? So, why should I need to pass it?
 
Back
Top