HtmlElement has no constructer?

  • Thread starter Thread starter Andy B.
  • Start date Start date
A

Andy B.

I have the following function stub:

Public Function LiveConditionsToHtml(ByVal LiveConditions as
Weather.LiveWeatherData) as HtmlElement
end function

I need to create an HtmlElement "table". When I do something like:

dim Table as new HtmlElement("table")

I get 'The type HtmlElement has no constructer'. When I do this:

dim Table as HtmlElement

I get 'The variable 'Table' is never used'. How do I fix this problem?

I am trying to create an HtmlElement and return it to the code so it can be
added to the browser.document.body property. GThis has to be done
disconnected from the browser document.
 
Andy said:
I have the following function stub:

Public Function LiveConditionsToHtml(ByVal LiveConditions as
Weather.LiveWeatherData) as HtmlElement
end function

I need to create an HtmlElement "table". When I do something like:

dim Table as new HtmlElement("table")

I get 'The type HtmlElement has no constructer'. When I do this:

dim Table as HtmlElement

I get 'The variable 'Table' is never used'. How do I fix this problem?

I am trying to create an HtmlElement and return it to the code so it can be
added to the browser.document.body property. GThis has to be done
disconnected from the browser document.


I know only very little about it, but as far as what I've taken from the
object browser and documentation, it seems this class and others like
HtmlDocument are only there to support the DOM and gives a read-only
view of existing Html documents so that you're able to analyze them as
they are returned by the WebBrowser control. The model is not there to
build new Html documents.


Armin
 
Armin said:
I know only very little about it,

Yeah, obviously. So forget what I wrote... Right after posting I saw the
HtmlDocument's CreateElement method that does create a new HtmlElement
object. Also look at the AppendChild method... in short, just look at
the example for the HtmlDocument class.

Me bad....


Armin
 
Back
Top