wonderful coders. I'm getting an error on commented-out code. The error is as below:
Previously I had controls with IDs #datepicker1 and #datepicker2, then I decided to no longer need them, so I removed them in code, and removed the Javascript that manipulated them.
The odd thing is that this code works in Debug, but throws the exception when deployed and run from a server.
Thanks
Comment-out definition Filters. (programming) To temporarily disable a section of source code by converting it into a comment.
Leaving commented code in your code base is a bad practice but that is not what you are doing if you work through it all and eliminate it. I suspect the person you are talking to either doesn't understand the process you are using or is being dogmatic. In reality, commented code is harmless.
You can comment out one or more lines of code in any C/C++ editor view. The leading characters // are added to the beginning of each line when commenting one or more lines of code. You can also block comment multiple lines of code using the characters /* */ .
Comments do not affect the performance of any software at all. What comment does is it provides a way for you to understand, in human terms, what is going on within your code.
The biggest effect that comments have is to bloat the file size and thereby slow down the download of the script.
That will only comment out the JavaScript, not the ASP.NET tag. I would just use source control and delete the lines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With