I want to put an comment in web.config
file, something like this:
<httpRuntime
requestValidationMode="2.0" // require for [ValidateInput(false)] in .net-4.0
requestPathInvalidCharacters="" // include & character in the url
enableVersionHeader="false" // disable X-AspNet-Version header
/>
Is there any way to put comments in this way, using server-side comments like <% %>
or something?
Right click and select "Block Comment".
On some Button click,after it modified like :or any where in the web. config file commnets should be added or in any commented part text should be added.
To enter comments in a configuration file, use a comment character and enter the comment text anywhere to the right of the comment character on the same line. Valid comment characters are a semicolon (;), a pound sign (#), or two hyphens (--). You can start comments in any column of a separate line.
ctl K + C combination to comment that line... to uncomment ctl K + U combination is used.
The web.config
file is an XML file, so your only option is to use XML comments:
<!--
requestValidationMode="2.0" - require for [ValidateInput(false)] in .net-4.0
requestPathInvalidCharacters="" - include & character in the url
enableVersionHeader="false" - disable X-AspNet-Version header
-->
<httpRuntime
requestValidationMode="2.0"
requestPathInvalidCharacters=""
enableVersionHeader="false"
/>
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