Hi Arman,
Add the following configuration to the web.config file in your application's
root directory:
<configuration>
<system.web>
<trace enabled="true" />
<compilation debug="true" />
</system.web>
</configuration>
<trace... /corresponds to Page.Trace methods.
<.. debug.. /corresponds to System.Diagnostics.Debug methods.
Debug will write to the Visual Studio output window as you requested, but only
if debug="true".
Trace output can be viewed in two ways:
1. Request "/trace.axd" in your browser when <traceis enabled. You'll see
the trace per request and a Details link to drill down to page-level trace.
The actual Page.Trace output is under the "Trace Information" section.
2. You can have page-level trace information appended to the end of each
requested page by making the following changes to the configuration above:
<configuration>
<system.web>
<trace enabled="true" pageOutput="true" />
</system.web>
</configuration>
3. You can have page-level trace information appended to the end of a
particular page by modifying the @ Page directive as follows:
<%@ Page ... Trace="true" ... %>
"Trace" can be added to the @ Page directive even when <traceis not enabled
in the web.config file.
Debug="true" can also be added to the @ Page directive even when using
debug="false" in the web.config file, but you'll have to attach the debugger
after building in VS 2005 to see what's written in the output window. IIRC,
that wasn't a problem in earlier versions of VS.NET.
--
Dave Sexton
"Arman Sahakyan" <ar********@rambler.ru(donotspam)wrote in message
news:2F**********************************@microsof t.com...
Hi,
I'm an MFC programmer and know little about .NET programming.
Now, for some reasons, I'm developing an ASP .NET application...
What I need to know is how to output into VS's Output Window like
what MFC's TRACE macro does (during debugging).
Could you please share your knowledge with me?
Thanks in advance.
--
======
Arman