How to set the Description of a property in a custom server control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • altaafhussein
    New Member
    • Jul 2009
    • 9

    How to set the Description of a property in a custom server control

    Hi, I have created a custom Server Control and I want to add a description to the properties and events that the control holds. I have looked over the Internet and came up with the following...

    Code:
    <Description("G ets/Set somthing for the property")>_
    public property Somthing() as Boolean
    Get
    end get
    Set
    end set
    End property

    Unfortunately this does not seem to work in visual studio .net 2008.

    I am not sure if i am missing somthing off can anyone help

    Thanks in advanvce

    altaafhussein
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Here's a working one from live code that I use (though it is C#)
    It has description as well as several other properties

    Code:
            [Category("CustomValues"),
            Browsable(true),
            ReadOnly(false),
            Bindable(false),
            DefaultValue(5000), /* DefaultValue is only for Designer. Does not actually set value of property.*/
            DesignOnly(false),
            Description("UDP port for the client")]
            public int ClientPort
            {
                get { return (int)nudListeningPort.Value; }
                set { nudListeningPort.Value = (decimal)value; }
            }

    Comment

    Working...