Thursday, March 29, 2012

newbie: how to print stuff at the shell using C# while at programming in asp.net

Hi, I made myself a componment, so it can talk to the database.
I want to able to see the certain value within the code itself. And I'm unable to use asp:label control.
Is there's any way I can print stuff on the shell so I can keep track of where I'm at with my varable?
I tried Console.Write(temp); but it didn't seem to work :(
TIA
Use one of the System.Diagnostics.Debug.Writexxx() methods. These will appear in the Output Window in Visual Studio as you run the site under the debugger.
Alternatively, use the HttpContext.Current.Trace.Write() method, and this will put output into the ASP.NET Trace, which you can either see on the page or via the trace.axd handler.

Thank you very much DMW, System.Diagnostics.Debug.Writexxx() is useful

case close

0 comments:

Post a Comment