Professional Web Applications Themes

Description of property - ASP.NET Building Controls

I have simple question. I build user control with property: Public Property clickFill() As Boolean Get Return _clickFill End Get Set(ByVal Value As Boolean) _clickFill = Value End Set End Property Where in this code I put the description of property, which user see on code behind when use this user control? And I have another question. How can I convert this user control into regular control, like <asp:listBox> for example? Not ascx file but dll file. Is that very complicated? Any example? The problem is if I want to send someone this control, the person also see all the ...

  1. #1

    Default Description of property

    I have simple question.

    I build user control with property:

    Public Property clickFill() As Boolean

    Get
    Return _clickFill
    End Get

    Set(ByVal Value As Boolean)
    _clickFill = Value
    End Set

    End Property

    Where in this code I put the description of property, which user see on code behind when use this user control?

    And I have another question.

    How can I convert this user control into regular control, like <asp:listBox> for example?
    Not ascx file but dll file. Is that very complicated? Any example?

    The problem is if I want to send someone this control, the person also see all the code, which is included in user control ascx file.

    Thank you for your answer,

    Simon

    simon Guest

  2. #2

    Default Re: Description of property

    <Bindable(true), Category("My Custom Category"), Description("When this
    is set to true you can click anywhere to fill")>
    Public Property clickFill() As Boolean


    Get
    Return _clickFill
    End Get


    Set(ByVal Value As Boolean)
    _clickFill = Value
    End Set


    Try the above code for VB.NET. If you get any compilation errors make
    sure that you are inheriting the proper namespaces. I think
    System.ComponentModel is necessary. Look up the class Attributes that I
    use and add the word Attribute in the MSDN. e.g. DescriptionAttrribute,
    etc


    End Property

    recoil@community.nospam Guest

  3. #3

    Default Re: Description of property

    <Bindable(true), Category("My Custom Category"), Description("When this
    is set to true you can click anywhere to fill")>
    Public Property clickFill() As Boolean


    Get
    Return _clickFill
    End Get


    Set(ByVal Value As Boolean)
    _clickFill = Value
    End Set


    Try the above code for VB.NET. If you get any compilation errors make
    sure that you are inheriting the proper namespaces. I think
    System.ComponentModel is necessary. Look up the class Attributes that I
    use and add the word Attribute in the MSDN. e.g. DescriptionAttrribute,
    etc


    End Property

    recoil@community.nospam Guest

  4. #4

    Default Re: Description of property

    <Bindable(true), Category("My Custom Category"), Description("When this
    is set to true you can click anywhere to fill")>
    Public Property clickFill() As Boolean


    Get
    Return _clickFill
    End Get


    Set(ByVal Value As Boolean)
    _clickFill = Value
    End Set


    Try the above code for VB.NET. If you get any compilation errors make
    sure that you are inheriting the proper namespaces. I think
    System.ComponentModel is necessary. Look up the class Attributes that I
    use and add the word Attribute in the MSDN. e.g. DescriptionAttrribute,
    etc


    End Property

    recoil@community.nospam Guest

  5. #5

    Default Re: Description of property

    Hi,

    I tried like you suggest, but I get an error message:

    Atribute specifier is not a complete statement. Use a line continuation to
    apply the attribute to the folowing statement.
    What is wrong?


    lp,Simon


    "recoilcommunity.nospam" <marc.derider> wrote in message
    news:1110028782.848576.125240z14g2000cwz.googlegr oups.com...
    > <Bindable(true), Category("My Custom Category"), Description("When this
    > is set to true you can click anywhere to fill")>
    > Public Property clickFill() As Boolean
    >
    >
    > Get
    > Return _clickFill
    > End Get
    >
    >
    > Set(ByVal Value As Boolean)
    > _clickFill = Value
    > End Set
    >
    >
    > Try the above code for VB.NET. If you get any compilation errors make
    > sure that you are inheriting the proper namespaces. I think
    > System.ComponentModel is necessary. Look up the class Attributes that I
    > use and add the word Attribute in the MSDN. e.g. DescriptionAttrribute,
    > etc
    >
    >
    > End Property
    >

    simon Guest

  6. #6

    Default Re: Description of property

    Because, i guess VB.NET requires that the Property line that i put on a
    separate line be on the same line, or you use the _ character at the
    end of the first line to denote that it spans multiple lines.
    thus

    <Bindable(True), Category("Appearance"), DefaultValue(""),
    Description("This is a brief description")> _
    Property [Text]() As String
    Get
    Return _text
    End Get

    Set(ByVal Value As String)
    _text = Value
    End Set
    End Property

    or

    <Bindable(True), Category("Appearance"), DefaultValue(""),
    Description("This is a brief description")> Property [Text]() As String
    Get
    Return _text
    End Get

    Set(ByVal Value As String)
    _text = Value
    End Set
    End Property

    My apologies, I wrote the code in my head.

    recoil@community.nospam Guest

Similar Threads

  1. Replies: 0
    Last Post: November 13th, 11:04 AM
  2. Custom Attributes (AttributeTargets.Property) and Property Type
    By Zarko Gajic in forum ASP.NET Building Controls
    Replies: 0
    Last Post: April 7th, 02:20 PM
  3. Replies: 2
    Last Post: May 30th, 04:28 AM
  4. Replies: 0
    Last Post: May 20th, 06:19 AM
  5. property description list
    By LeeD in forum Macromedia Director Basics
    Replies: 0
    Last Post: December 9th, 03:57 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139