Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Custom Attributes (AttributeTargets.Property) and Property Type

Thread Tools

Custom Attributes (AttributeTargets.Property) and Property Type

Zarko Gajic
Posts: n/a

I've create a custom attribute class "MyAttribute" with

Is there a way to get the type of the property myAttribute is applied to?

I need to raise an exception if "MyAttribute" is attached to a non-string
type of property, for example. In other words I have to make sure
MyAttribute does not only targets properties but also string properties.

~Zarko Gajic

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
WebControl.Attributes.Add and custom attributes P4trykx ASP .Net 2 01-31-2007 04:33 PM
Could not find a property named '... ' on the type specified by the DataObjectTypeName property in ObjectDataSource '...' Anabela Silva ASP .Net 0 11-01-2006 07:08 PM
Custom Control : One custom property to array of controls anon ASP .Net Web Controls 0 01-15-2005 11:32 AM
Keep custom property-value in custom rendered control Rob Joosen ASP .Net Building Controls 0 05-12-2004 11:56 AM
Custom TextBox with custom attributes and properties question John Wright ASP .Net Building Controls 1 03-01-2004 02:01 PM