Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a

<input type="text" id="txt1"></input>


i have 1 control inside the div but when i am checking for child nodes /descendats it gives
a count of 3.
thats becoz of \r\n\t & \r\n so the total count is 3 , but i want the exact count as her in my case i have 1 controls.

my code is :
foreach (HtmlNode item in nodeList)
{

int cnt = item.Descendants().Count();
}
any suggestion .
Plz help
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900