Search code examples
asp.netconsole.log

Is there a console log for asp.net?


If I have IF statement like below:

If currentdate >= rating1  then
    status = 2
ELSEIF currentdate >= rating2  then
    daylight_savings_status = 0
ELSEIF currentdate >= rating3  then
    daylight_savings_status = 1
ELSE 
    daylight_savings_status = 1
End If

Is there something like in JavaScript

console.log('test');

That I can test on the which IF statement is truth of the statement?

This way I be able to test it in browsers.


Solution

  • 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)