I just try the following for findng all div's in HTML with known Part of the ID:
var AllDiv = document.All.Where(m => m.LocalName == "div" && m.GetAttribute("id").StartsWith("new_order_"));
It allways results in an NullReferenceException. I also try it with "Contrains", but with the same result.
The div's look like:
<div id="new_order_50000_US">...</div>
<div id="new_order_4000_EU">...</div>
Can anybody help me with this?
THX
You might need to check if current
div
hasid
attribute before checking the attribute value to avoid NRE :