嗨,任何人都知道任何可以在包含 HTML 的字符串中选择表单的好的 C# 库
<html>
<body>
some text or layout
..
<form id="blabla" name="blabla" method="post" action="register.aspx">
<input type="hidden" name="token" value="12345">
<input type="text" name="username" value="">
<input type="text" name="password" value="">
</form>
..
some text or layout
</body>
string HTML = (above)
FormObject formtag = GetForm(HTML); // get only the <form>..</form>
var a = formtag.Method // get or post
var b = formtag.Action // get the URL it post
// construct the post string
// username={0}&password={1}&token=12345
var poststring = string.Format(GetPostString(formtag), "Anima", "abcdef");
// result
// username=Anima&password=abcdef&token=12345
是否有任何 C# 库可以获取表单和表单内的所有输入项?