ASP.Net. Enable tracing in code.
I'm looking for a way to enable tracing for an ASP.Net page via codebehind without using page or webconfig methods.
My end goal is to have a page that responds to a querystring like? trace = true and then display trace information, but before that the page would have rendered fine.
I've done a few searches and my word combination ends up with tutorials on using tracing in general, so any help would be much appreciated.
Thanks -Birk
+2
Birk
source
to share
2 answers
You can set Trace.IsEnabled to true in your code.
+2
Greg
source
to share
You can add an iframe to your page that links to trace.axd and only display that iframe if the query string contains "trace = true"
+1
Corne
source
to share