Can any one help me out how to get the CSS Class name or Style properties of a Text / Keyword from html document using <b>C#?</b>
Say I am passing the text "Sample Text" from code.
I have a html document which has following code
<pre lang="text"><div class="sampleclass">
Sample Text
</div></pre>
I need to get the result as sampleclass when Sample Text is passed.
What I have tried:
I have used HTMLAgility library , I can get the text based on class name but I need the other way around to get class name when text is passed.