Been struggling with this for awhile. I can't seem to figure out how to get a regex request to only return the value attribute of a particular html tag. Any help is greatly appreciated.
2 Answers
Are you trying to parse HTML with Regex? Don't or you will continue to struggle. Use SgmlReader or HTML Agility Pack for this purpose.
Comments
RegEx is not a good solution for parsing unstructured (or unknown) HTML.
See this SO post for compelling reasons why this is the case.
I suggest using a parser such as the HTML Agility Pack and querying the parsed document.
C#and a.nettag on your question, why don't you just read the value on the postback of the page?