Try it
using HtmlAgilityPack;
string sReturn = string.Empty;
HtmlDocument htmldoc = new HtmlDocument();
htmldoc.LoadHtml(HtmlString);
IEnumerable<HtmlNode> hn = htmldoc.DocumentNode.Descendants();
foreach (HtmlNode nd in hn)
{
if (nd.Name.ToLower() == "a")
{
sReturn += nd.Attributes["href"].Value + @"\r\n";
}
}
IEnumerable<HtmlNode> hn = htmldoc.DocumentNode.Descendants();
foreach (HtmlNode nd in hn)
{
if (nd.Name.ToLower() == "input")
{
sReturn += nd.Attributes["value"].Value + @"\r\n";
}
}