HtmlWindow::WindowFrameElement Property

 

Gets the frame element corresponding to this window.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
property HtmlElement^ WindowFrameElement {
	HtmlElement^ get();
}

Property Value

Type: System.Windows.Forms::HtmlElement^

An HtmlElement corresponding to this window's FRAME element. If this window is not a frame, it returns null.

When you retrieve a FRAME element from the Frames collection, it returns an HtmlWindow. Call WindowFrameElement on this object if you need to access attributes of the underlying FRAME element, such as the SRC attribute.

The following code example compares the SRC attribute of frames in a FRAMESET to the current location. If they are different, the frames are reset to their original URLs.

No code example is currently available or this language may not be supported.

UnauthorizedAccessException

You cannot access a FRAME elements or the FRAME's document if the FRAME is in a different zone than the FRAMESET that contains it. For a full explanation, see About Cross-Frame Scripting and Security.

.NET Framework
Available since 2.0
Return to top
Show: