Top "Custom-attributes" questions

In .NET Framework, custom attributes are user defined attributes which enable providing metadata for application elements such as assemblies, classes and methods.

jquery: get value of custom attribute

html5 supports the placeholder attribute on input[type=text] elements, but I need to handle non-compliant browsers. I know there …

jquery custom-attributes attr
ASP.NET MVC 4 Custom Authorize Attribute with Permission Codes (without roles)

I need to control the access to views based on users privilege levels (there are no roles, only privilege levels …

asp.net-mvc-4 authorization custom-attributes
How do I read an attribute on a class at runtime?

I am trying to create a generic method that will read an attribute on a class and return that value …

c# generics custom-attributes
How to create a custom attribute in C#

I have tried lots of times but still I am not able to understand the usage of custom attributes (I …

c# c#-4.0 custom-attributes
Android findViewById() in Custom View

I've written my custom View and i want to update some other views after interacting with my custom view. Main …

android android-layout view custom-attributes findviewbyid
How enumerate all classes with custom class attribute?

Question based on MSDN example. Let's say we have some C# classes with HelpAttribute in standalone desktop application. Is it …

c# class attributes custom-attributes enumerate
An attribute argument must be a constant expression, ...- Create an attribute of type array

Here is my custom attribute and a class I'm using it on: [MethodAttribute(new []{new MethodAttributeMembers(), new MethodAttributeMembers()})] public class …

c# custom-attributes
Exclude property from serialization via custom attribute (json.net)

I need to be able to control how/whether certain properties on a class are serialized. The simplest case is […

c# serialization json.net custom-attributes
Custom attribute on property - Getting type and value of attributed property

I have the following custom attribute, which can be applied on properties: [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public class IdentifierAttribute : …

c# .net custom-attributes
ASP.NET MVC 4 custom Authorize attribute - How to redirect unauthorized users to error page?

I'm using a custom authorize attribute to authorize users' access based on their permission levels. I need to redirect unauthorized …

asp.net-mvc-4 authorization custom-attributes