Results 1 to 2 of 2

Thread: <LINK> tag

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    77

    <LINK> tag

    to maintain styles in my user control...I use stylesheets as separate files. how can I write dynamic LINK tag to the user control

  2. #2
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    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:

    Code:
    Public strLinkClass as String
    
    Public WriteOnly Property SetLinkClassText() as String
            Set(ByVal Value As String)
                strLinkClass = Value
            End Set
    End Property
    In your .ASCX html:

    Code:
    <link class="<%= strLinkClass %>">
    In your .ASPX pages:

    Code:
    <uc1:uc id="uc" runat="server" SetLinkClassText="VALUE YOU WANT HERE"></uc1:uc>
    ~Ryan





    Have I helped you? Please Rate my posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width