Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio warns me about some invalid html attributes

I have a list of items in an html table. On each row (tr) I'm proceeding like this:

<tr idAffaire="@suite.IdAffaire" idSuite="@suite.IdSuite" class="@suite.Username row droppable"> 

I used the attributes idAffaire and idSuite for retrieving some infos later. I know the official identification attribute is "id" but in my case I need 2 id. When I compile my code, VS is warning me about some things:

  • this name contains uppercase characters, which is not allowed.
  • attribute 'idaffaire' is not a valid attribute of element 'tr'
  • ...

Is it possible to prevent these warnings? Is there a better way of doing?

Thank you.

like image 350
Bronzato Avatar asked Feb 25 '26 04:02

Bronzato


1 Answers

Yes, in Tools > Options > Text Editor > HTML > Validation > [Untick] Show errors

Ideally, you could use 2 hidden input fields with the id="suite" and value="whatever" to allow you to pick these up in a valid way.

like image 172
Digbyswift Avatar answered Feb 27 '26 17:02

Digbyswift



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!