IHTMLElement2::tagUrn Property
Sets or gets the Uniform Resource Name (URN) specified in the namespace declaration.
Syntax
HRESULT IHTMLElement2::get_tagUrn(BSTR *p);HRESULT IHTMLElement2::put_tagUrn(BSTR v);
Parameters
- p
- Pointer to a variable of type BSTR that receives the URN in the namespace declaration, or the value in Possible Values.
- v
- BSTR that specifies the URN in the namespace declaration, or the value in Possible Values.
Possible Values
null Default. Returned for standard HTML tags, or for custom tags that omit the namespace declaration.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
To declare the namespace in the document, use the XMLNS attribute of the html element.
Download the HTC for the sample below: simple.htc
Examples
An alternative call to the HTC can also be made as an attribute, as shown in the following code example.
Note Make sure there are no spaces in your style's declaration.<HTML XMLNS:InetSDK='http://msdn.microsoft.com/workshop'> <SCRIPT> function window.onload() { window.status = 'scopeName = ' + hello.scopeName + '; tagUrn = ' + hello.tagUrn; } </SCRIPT> <BODY> <InetSDK:HelloWorld ID='hello' style="behavior:url(simple.htc)"></InetSDK:HelloWorld> </BODY> </HTML>
See Also
Using Custom Tags in Internet Explorer