最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Error on commented-out code - Stack Overflow

programmeradmin0浏览0评论

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
Add a ment  | 

2 Answers 2

Reset to default 7

That 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.

发布评论

评论列表(0)

  1. 暂无评论