I have some c# code and in my html I have a div like:
<div id="xyz"></div>
I want to populate some thing within that div, when a method is called.
I am using the following code
public MainPage()
{
InitializeComponent();
HtmlDocument htmlDocTimeListner = HtmlPage.Document;
HtmlElement htmlElementListener = htmlDocTimeListner.GetElementById("xyz");
}
being new to .net and C#..not sure what to do here. In JS I would have done the following
htmlElementListner.getElementById("xyz").innerHTML = "my new text to populate in the div";
How would I achieve the same results in .net?
1 Answer