Tuesday, 15 September 2015

Comment a line of code in a SqlDataSource in ASP.NET markup -



Comment a line of code in a SqlDataSource in ASP.NET markup -

i utilize

<%-- comment/or line of code --%>

to comment out line of code in asp.net mark up. select line comment out , press

ctrl+(k, c)

to automatically comment out line or

ctrl+(k, u)

to uncomment line. reason, cannot comment out line of code in sqldatasource way. gives error:

....... <%--selectcommand="select * [mytable] order [code]"--%> selectcommand="select * [anothertable] order [code]" .........

i wonder why getting error in such cases? there way comment out line of code in sqldatasource in markup?

as michael said, such comments not allowed. can utilize sql comments within property value, example:

selectcommand="/*select * [mytable] order [code]*/select * [anothertable] order [code]"

asp.net comments

No comments:

Post a Comment