<p>How to parse the DOM and determine what row is selected in an ASP.NET <code>ListView</code>? I'm able to interact with the DOM via the <code>HtmlElement</code> in Silverlight, but I have not been able to locate a property indicating the row is selected.</p>
<p>For reference, this managed method works fine for an ASP.NET ListBox</p>
<pre><code>var elm = HtmlPage.Document.GetElementById(ListBoxId);

foreach (var childElm in elm.Children)
{
    if (!((bool)childElm.GetProperty(&quot;Selected&quot;)))
    {
       continue;
    }
}
</code></pre>

I don't have my dev environment up to test this, but could you call GetProperty('selectedIndex') on the ListBoxID element? Then from that you figure out which child is selected and return that child using the elm.Children.
Edit:
Got my dev environment up this morning and did some testing. Here is a code snippet that worked for me:
```
```
HtmlElement elem = HtmlPage.Document.GetElementById("testSelect");
int index = Convert.ToInt32(elem.GetProperty("selectedIndex"));
var options = (from c in elem.Children
              let he = c as HtmlElement
              where he.TagName == "option"
              select he).ToList();

output.Text = (string)options[index].GetProperty("innerText");
```
```
Of course, you'll have to change "textSelect" to the name of your html select element. The linq query is needed since the Children property is made up of ScriptableObjects and only about half of them are the option elements which is what you care about.