Silverlight.HtmlAccess Property

Gets or sets whether to allow the Silverlight-based application to access the HTML page Document Object Model (DOM).

Namespace:  System.Web.UI.SilverlightControls
Assembly:  System.Web.Silverlight (in System.Web.Silverlight.dll)

Syntax

'Declaration
<BrowsableAttribute(True)> _
Public Overridable Property HtmlAccess As HtmlAccess
    Get
    Set
'Usage
Dim instance As Silverlight
Dim value As HtmlAccess

value = instance.HtmlAccess

instance.HtmlAccess = value
[BrowsableAttribute(true)]
public virtual HtmlAccess HtmlAccess { get; set; }

Property Value

Type: System.Web.UI.SilverlightControls.HtmlAccess
A value that indicates whether the Silverlight-based application can access the HTML DOM.

Remarks

The default value is HtmlAccess.SameDomain. This allows the Silverlight-based application to access the content from the same domain as the HTML page it is in.

By default, Silverlight disallows access to a Silverlight-based application that is loaded from a different domain.

The HtmlAccess enumeration corresponds to a value that can be set with the Silverlight param tag. Possible values for the corresponding Silverlight param tag are true or false. However, the HtmlAccess enumeration provides three possible settings, because not specifying the Silverlight param has the same effect as setting this property to HtmlAccess.SameDomain.

This property is used only for applications that are created by using Silverlight 2.

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Silverlight Class

Silverlight Members

System.Web.UI.SilverlightControls Namespace

Other Resources

HTML Bridge: Interaction Between HTML and Managed Code