Is there a console log for asp.net?

I would try to output it to the clients console ONLY If the Console.WriteLine() function doesnt work for you.

Page.Response.Write("<script>console.log('" + msg + "');</script>");

Ultimately though you should try to write debug statements in your own console (with System.Diagnostics.Debug.WriteLine(...)) and not the client's.

NB System.Diagnostics.Debug.WriteLine(...); gets it into the Immediate Window in Visual Studio 2008.

Go to menu Debug -> Windows -> Immediate:


For Server Side

C# & VB.Net Server Side - This will show in the Visual Studio Output window.

System.Diagnostics.Debug.WriteLine(log data here)

Client Side JavaScript/Jquery - This will show in the browser devtools console window. Works on all popular browsers.

console.log(log data here) 

Tags:

Asp.Net