From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from WebObject)

New in 2010r4

This control can be used to add your own HTML to a WebPage before the page is sent to the client.

Closed EditSource Opening

ControlID fa-lock-32.png Name fa-lock-32.png Source fa-lock-32.png
Enabled Page fa-lock-32.png
Location fa-lock-32.png Parent fa-lock-32.png

Close GotoURL
ExecuteJavaScript UpdateBrowser


The Source value must be valid HTML. That means if you are going to include JavaScript for example, it must be wrapped in valid HTML syntax. Anything that can be wrapped in valid HTML (JavaScript, CSS, meta tags, etc.) can be included in the Source.
WebPageSource cannot be used with a WebDialog or WebContainer. It is for use with WebPage classes only. The IDE does not currently enforce this but it will eventually.

Class Constants

Assign a constant to the Location property to specify the location at which the HTML will be inserted.

Name Description
LocationBeforeContent The Source will be inserted into the page body just before the controls.
LocationAfterContent The Source will be inserted into the page body just after the controls.

Please use WebApplication.HTMLHeader property if you need to add something to the headers.

See Also

WebPopupMenu class