I'm fairly new to C#, and I'm trying to get a level from an in-browser game. This is the code I used and it came with an error
"Object reference not set to an instance of an object"
HtmlElementCollection elmnt = webBrowser1.Document
.GetElementById("levelFrontTopArea")
.GetElementsByTagName("value");
levellabel.Text = elmnt[0].InnerText;
Below I will show you the HTML code:
<div class="levelFrontTopArea">
<a style="text-decoration:none" href="/profile.php">7</a>
</div>