wonderful coders. I'm getting an error on mented-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
wonderful coders. I'm getting an error on mented-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
Share Improve this question asked Jan 20, 2016 at 18:01 JustAPupJustAPup 1,78013 silver badges19 bronze badges 1-
1
Use
Ctrl
+K
+C
to ment out the code in visual studio. – Shaharyar Commented Jan 20, 2016 at 18:08
2 Answers
Reset to default 7That will only ment out the JavaScript, not the ASP.NET tag. I would just use source control and delete the lines.
That error isn't ing from your JavaScript, it's happening on the server side. (In datepicker1.ClientID
).
If you don't want to run that code, you'll need to use a server side ment (<%-- --%>
in ASP.NET). Or delete the line entirely.