views:

19

answers:

0

How can I obtain actual instances of the underlying objects returned as string representations by HtmlElement's GetAttribute() method?

I'm asking this because not all types of HTML attributes are returned as their visual string representation by GetAttribute(), but in some cases, as class names. The few cases where I've found this to happen are

  • when I'm trying to access the action attribute of a HTML form, that links to a secured https page - returns mshtml.HTMLInputElementClass as string.
  • when I'm trying to access event attributes, such as onclick - returns System.__ComObject as string.

Is there some other way to obtain this information using the HtmlElement or the WebBrowser control, or should I resort to ActiveX interop?