Click here to Skip to main content
14,126,835 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am creating a new WebControl that renders as a set of nested div blocks. The inherited CssClass is being used to place a class on the wrapper div; I would like to add a TextCssClass property that will apply a class on one of the child blocks. My code looks like this:

<Bindable(True), Category("Layout"), CssClassProperty()> _
Public Property TextCssClass() As String
        Dim o As Object = ViewState("TextCssClass")
        If o IsNot Nothing Then
            Return o.ToString
            Return ""
        End If
    End Get
    Set(ByVal value As String)
        ViewState("TextCssClass") = value
    End Set
End Property

From what I little I've been able to find on the web, the attribute <CssClassProperty()> should tell Intellisense that this property is linked to the list of available classes and should respond just like the default CssClass property.

However, the property is not getting linked: as far as Intellisense is behaving, it is an ordinary String property. What am I missing?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190518.1 | Last Updated 4 Oct 2011
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100