Questions tagged [custom-attributes]

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

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

1173 questions
0
votes
1 answer

WCF Attribute injection using an IOC Container

Using ASP.NET MVC I am able to replace the FilterProvider as so var oldProvider = FilterProviders.Providers.Single(f => f is FilterAttributeFilterProvider); FilterProviders.Providers.Remove(oldProvider); FilterProviders.Providers.Add(new…
0
votes
2 answers

How to read custom data type

I was created this return from WCF and may i know how could i read the data specifically ?? [DataContract] public class UserData { [DataMember] public int userID { get; set; } [DataMember] public string name { get; set; } …
1myb
  • 3,536
  • 12
  • 53
  • 73
0
votes
1 answer

Custom elements and package name

When creating a custom element with attributes in Android I need to put the namespace of the application in the layout. For example:
theblitz
  • 6,683
  • 16
  • 60
  • 114
0
votes
2 answers

Magento product display text "array" instead of multiple values

On my Magento product page; when a product has multiple values for one custom attribute; instead of displaying the values it displays the text "array". It works fine with one value. Thanks, -Sam
Sam
  • 5,150
  • 4
  • 30
  • 51
0
votes
1 answer

client side validation in MVC3 not working

below is the code somehow client side validation is not working...I searched couple of questions in this forum and wrote this.. here is the custom validation attribute "startDateAttribute" [AttributeUsage(AttributeTargets.Field |…
GANI
  • 2,013
  • 4
  • 35
  • 69
0
votes
1 answer

Parameter attribute not showing up

I'm working on an auditing piece and am trying to use an attribute to mark parameters to a method that should be recorded in the audit for additional information. However, for whatever reason, I can't seem to check for whether the attribute exists.…
fire.eagle
  • 2,723
  • 1
  • 21
  • 23
0
votes
2 answers

Custom .NET Attribute to Check Method Return Type

At my company we use MVC.NET and Entity Framework to perform a SQL connection. I was wondering if there is a way to create a custom attribute on a class that will create warnings if the return type of a method is not IEnumberable? The idea is to…
endyourif
  • 2,186
  • 19
  • 33
0
votes
2 answers

How to determine if a customAttribute from a class is equals to another?

check that I have a customAttribute called ResponseAttributes. I have declared an interface and several concrete classes { Question 1, Question2, Question3 } [AttributeUsage(AttributeTargets.Property)] public class ResponseAttribute : Attribute {…
Darf Zon
  • 6,268
  • 20
  • 90
  • 149
-1
votes
1 answer

Custome attribue in magento having different values for two products types

In Magento is it possible to have a custom attribute say "Type" with different values for each prodcut type for example Shoes, and Chairs? Here is an example to explain - (Categories can be any, this is just example) I have products shoes, and…
Sohail
  • 2,058
  • 7
  • 33
  • 57
-1
votes
1 answer

Why are classLoader magic values in defineClass() throwing an exception?

I want to write a classLoader that can help me implement customized classes and ultimately a whole component at run time. Right now I'm in process of loading the class. I'm trying to load this role.java file. However when I get to this part of the…
-1
votes
1 answer

How can i use Custom attributes of html in Google tag manager to track clicks on lots of buttons

I have some long lists of buttons. For example, i have one single list of car models that all have the same custom data attribute of "modellist", while they have also another data attribute which is the name of that car model (Note that these…
-1
votes
1 answer

Top and left have no affect on the positioning of a custom button

For a project I'm working on, I need to make a custom button that can be dragged and dropped and then have it's position saved so that a separate window can be opened with the button in the same position as it was saved at. The issue right now is…
EJay
  • 1,079
  • 2
  • 12
  • 23
-1
votes
1 answer

Client-Side unobtrusive validation not working as expected

I am implementing Custom Unobtrusive client-side JavaScript for an MVC Application. The custom validation method ([EnforceTrue] Attribute) does fire when I press the submit button, but it does not have any effect. In the submit event, The…
-1
votes
1 answer

Validation attribute in asp.net mvc

My model is something like this: public class Line { public int CatalogNumber {get; set;} public int TeamCode {get; set;} } I have a view that gets catalog number and a team code, And I want to check two things: there is such catalog…
gdoron
  • 147,333
  • 58
  • 291
  • 367
-1
votes
1 answer

custom attribute not found in my custom View

I have this line in my account_particle.xml layout android:padding="?attrs/disc_padding" this attrs.xml:
Elad Benda
  • 35,076
  • 87
  • 265
  • 471