Reputation: 319
in the situation when i have conditional server code, visual studio keeps auto-renaming the duplicate id's.
here's a valid example:
<% if x = 1 then %>
<input type="hidden" id="hello" value=""/>
<% else %>
<input type="hidden" id="hello" value=""/>
<% end if %>
when visual studio's live error checking finds this, it will change my code without confirming with me to the following:
<% if x = 1 then %>
<input type="hidden" id="Hidden1" value=""/>
<% else %>
<input type="hidden" id="Hidden2" value=""/>
<% end if %>
how do i turn this off? i don't mind turning off the whole live error checking even. i don't know where to toggle this "feature" though.
thank you for reading my question,
Upvotes: 2
Views: 1029
Reputation: 12447
Go into Tools -> Options
Scroll down to Text Editor. Expand it, then select HTML and expand it. Then click Miscellaneous and you should see the following.
Deselect the first option and try it.
Upvotes: 4