Saahithyan Vigneswaran Saahithyan Vigneswaran - 7 months ago 10
Javascript Question

comment both js and asp at once

I'm looking for a way to comment both js and asp.

var myurl ="name.aspx?id=" + '<%= Request.QueryString["myid"].ToString() %>';


As you can see above, I've a js statement which calls asp, I need a way to comment both at once, ie, with one comment. Individually I can comment each js with
//
and asp with
<%-- -->
. But I want to comment it once or a comment block where I can enclose the line above.

Answer

If you comment only JavaScript code, It will be enough:

<script>
   //var myurl ="name.aspx?id=" + '<%= Request.QueryString["myid"].ToString() %>';
</script>