다음을 통해 공유


HtmlLink Server Control Declarative Syntax 

Creates a server-side control that maps to the link HTML element and allows you to specify a cascading style sheet reference in a Web page.

<link
    Disabled="Disabled"
    EnableViewState="False|True"
    Id="string"
    Visible="False|True"
    OnDataBinding="OnDataBinding event handler"
    OnDisposed="OnDisposed event handler"
    OnInit="OnInit event handler"
    OnLoad="OnLoad event handler"
    OnPreRender="OnPreRender event handler"
    OnUnload="OnUnload event handler"
    runat="server"
    />

Remarks

The HtmlLink control can be used to declaratively specify a cascading style sheet reference in a Web page.

Example

The following code example demonstrates how to use the HtmlLink control declaratively. The <link> element references a cascading style sheet.

<head runat="server">
    <title>HtmlLink Control</title>
    
    <link id="Resource1" href="StyleSheet.css" runat="server" />
</head>
<head runat="server">
    <title>HtmlLink Control</title>
    
    <link id="Resource1" href="StyleSheet.css" runat="server" />
</head>

See Also

Reference

HtmlLink

Other Resources

HTML Server Controls