to maintain styles in my user control...I use stylesheets as separate files. how can I write dynamic LINK tag to the user control
Printable View
to maintain styles in my user control...I use stylesheets as separate files. how can I write dynamic LINK tag to the user control
Use a public variable in your user control to control the Class attrbibute of the Link Element. Then create a property to change the class attribute value.
Something like this:
In your code behind:
In your .ASCX html:Code:Public strLinkClass as String
Public WriteOnly Property SetLinkClassText() as String
Set(ByVal Value As String)
strLinkClass = Value
End Set
End Property
In your .ASPX pages:Code:<link class="<%= strLinkClass %>">
Code:<uc1:uc id="uc" runat="server" SetLinkClassText="VALUE YOU WANT HERE"></uc1:uc>