Requirements for using Control & Property Attributes in ASP.NET

Discussion in 'ASP .Net' started by Nathan Sokalski, Jan 8, 2008.

  1. I am attempting to add Attributes to my ASP.NET Controls & Properties. Here
    is what my Controls look like:

    <ToolboxData("<{0}:parameter runat=""server""/>")> _
    Public Class Parameter : Inherits System.Web.UI.Control
    Private _name As String

    <Description("My Property Description")> _
    Public WriteOnly Property Name() As String
    Set(ByVal value As String)
    Me._name = value
    End Set
    End Property

    Protected Overrides Sub Render(ByVal writer As
    System.Web.UI.HtmlTextWriter)
    End Sub
    End Class

    Neither of these Attributes are showing when I use the Control. After a ton
    of searching the web for help (most of the pages I found showed nothing but
    what I already have), the only thing I found that told me anything was
    something about certain namespaces needing to be referenced and imported.
    Even after adding these namespaces to my references and imports, they still
    did nothing. Could somebody tell me ALL of the requirements necessary for
    the attributes to take effect (namespaces that need referenced and/or
    imported, settings that must be set, etc.)? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    Nathan Sokalski, Jan 8, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AleXmanFree
    Replies:
    3
    Views:
    566
    Hillbilly
    Oct 9, 2008
  2. Nathan Sokalski
    Replies:
    25
    Views:
    1,423
    Nathan Sokalski
    Mar 4, 2010
  3. Zarko Gajic

    Custom Attributes (AttributeTargets.Property) and Property Type

    Zarko Gajic, Apr 7, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    434
    Zarko Gajic
    Apr 7, 2005
  4. Nathan Sokalski

    Requirements for using Control & Property Attributes in ASP.NET

    Nathan Sokalski, Jan 8, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    804
    Nathan Sokalski
    Jan 8, 2008
  5. Kyle Schmitt
    Replies:
    3
    Views:
    185
    Kyle Schmitt
    Jul 24, 2007
Loading...

Share This Page