Server-Side Object Tag Syntax
Declares and creates COM and .NET Framework objects in a Web Forms page.
<object id="id"
runat="server"
latebinding="true|false"
class="Class Name">
<object id="id"
runat="server"
latebinding="true|false"
progid="COM ProgID"/>
<object id="id"
runat="server"
latebinding="true|false"
classid="COM ClassID"/>
When the ASP.NET page parser encounters a server-side <object> tag in an .aspx file, it generates a read-only property on the page, using the id attribute of the tag as the property name. The read-only property is then configured to create an instance of the object on first use. The resulting instance is not added as an object within the page's hierarchical server control tree; it is instead treated as a non-user interface (UI) variable declaration.
The classid, progid, and class attributes are mutually exclusive. You cannot include more than one of these attributes in a single server-side <object> tag. You can, however, include multiple server-side <object> tags on a Web Forms page and use these attributes in different tags.
Note |
|---|
For security reasons, managed controls using the <object> tag and file access protocol in an HTML page are not supported. Therefore, you cannot reference files directly from within the tag. |
Note