I have a HTML file, with several input fields some with an id, loaded into a C# string:
<div>
<input id="inpName" type="text" />
<input type="checkbox" />
</div>
Lets say I want to add an required attribute to the input with the id inpName.
In jQuery I would do:
$('input#inpName').prop('required', true);
Q: How can I achieve add this attribute without adding the HTMLAgilyPack?
Can I use XmlDocument or my only choice are regular expressions ?