You can try with this code:
HtmlDocument.DocumentNode.SelectSingleNode("//input[@value]").Attributes["value"].Value;
Hope this helps,
문제
I have an input tag and I want to get the value inside of that tag. I tried selectsinglenode(//input/@value)
and Attributes[]
and getAttributename
in DocumentNode of Agilitypack in C#, but they did not work.
<input type=hidden" value="S1" name="code1" />
I want to get the S1 value of this tag.
해결책
You can try with this code:
HtmlDocument.DocumentNode.SelectSingleNode("//input[@value]").Attributes["value"].Value;
Hope this helps,