According to the w3 XHTML specification, the label attribute specifies a shorter label for the option. However (using the try-it tool with FF3.5), I can't see any effect. Hence my question: what does this attribute really do?
EDIT
It seems that it overrides the label used in the dropdown list. The contents of the option are (as far as I...
Something that should be very easy has been the quest of my day.
How do you set a variable attribute of a xml element?
This is what I expected to work:
xmlElement.attribute(variableAttr) = "the variable attribute is set to this string";
However, I'm getting some error that this value can only be retrieved as a reference and not set....
I use this code the render the menu <% Html.Menu(GridSampleMenu.AdminMenu(Url)); %>
but I don't see any option to set the id on the rendered ul tag.
Are this is a known limit?
...
I've found the "ThreadStatic" attribute to be extremely useful recently, but makes me now want a "ThreadLocal" type attribute that lets me have non-static data members on a per-thread basis.
Now I'm aware that this would have some non-trivial implications, but:
Does such a thing exist already built into C#/.net? or since it appears so...
hi,
These are my classes.
public Class ClassA {
int a;
ClassB b;
public int getA(){return a;}
public ClassB getB(){return b;}
}
public Class ClassP {
int p;
int q;
int r;
public int getP(){return p;}
public int getQ(){return q;}
public int getR(){return r;}
}
these are my class. previously i was loading above using many-to-one m...
My datagrid (DevExpress) automatically will populate a grid based on the public fields of a business object.
What attribute can I place on the field to tell WinForm databinders to ignore it?
[???HideFromDataBindingSources???]
public bool IsSecurity
{
get { return _isSecurity; }
set { _isSecurity = value; }
}
...
I'm creating a custom attribute in C# and I want to do different things based on whether the attribute is applied to a method versus a property. At first I was going to do new StackTrace().GetFrame(1).GetMethod() in my custom attribute constructor to see what method called the attribute constructor, but now I'm unsure what that will giv...
The attributes method returns a hash of all the attributes with their names as keys and the values of the attributes as values; I want to utilize this method, creating a new derivative of the update_attributes(attributes) method, lets call it jz_attributes(attributes).
Update_attributes does this:
def update_attributes(attributes)
s...
Hello,
class A:
def __get(self):
return self._x
def __set(self, y):
self._x = y
def __delete_x(self):
print('DELETING')
del self._x
x = property(__get,__set,__delete_x)
b = A()
# Here, when b is deleted, i'd like b.x to be deleted, i.e __delete_x()
# called (and for immediate consequence, "DELETING" printed)
del b
Tha...
Hi all,
In my website, some products are not for sale in California. While the user checkouts, I have to do a validation like if the cart has items not for sale in California and user's shipping address is in CAlifornia, prevent user from checking out.
The sale in CA is set from admin side using an 'avl' attribute.
here is the code I u...
Hi,
Using PostSharp, is it possible to only "attach" to methods having the WebMethod-attribute?
Ex:
[Trace][WebService]
public partial class Service : System.Web.Services.WebService
{
// Caught by PS(WebMethod-attribute)
[WebMethod]
public void MyMethod()
{
return;
}
// Not caught by PS
public void...
I have a server control that needs to programmatically inject a JavaScript reference into the page. It is to reference Microsoft's Bing map control which requires &s=1 to be appended to the script URL for use over SSL. The problem is that the .NET Framework encodes the attributes and changes the & to an & (verified with Reflector). A...
Hello,
I'm in a need of getting a value of another property in CSS. Say I have this in a CSS file:
.something {
width: 256px;
}
then in something2 I want to use the value:
.something2 {
width: .something.width;
}
how could I achieve this without JavaScript? The reason why I need this is because I'm using CSS 3 animation:
@-webk...
Hi,
In my current project, Workflows have comments. Please have a look at the following code.
[CompositeId]
[KeyProperty(1, Column = "datum", Name = "Date", TypeType = typeof(DateTime))]
[KeyManyToOne(1, Column = "workflow_id", Name = "Workflow", ClassType = typeof(Workflow))]
public virtual IWorkflow Workflow { get; set; }
...
How do I write a class so that property and method descriptions are visible to people referencing the dll in other projects?
[Description("My age in years attribute")]
public int Age
{
get { return 0; }
set { }
}
doesn't work, neither does
/// <summary>
/// My age in years attribute
/// </s...
Is it possible to create a custom attribute , when applied to a method will execute the method in a seperate thread .
Class A
{
[threaded]
public void execute()
{
}
}
main()
{
A obja = new A();
obja.execute() // will excute in a new thread if [threaded] attribute is applied
}
...
In this code:
<html:text property="txtItem5" disabled="disTxtItem5">
I can see that "txtItem5" comes from a getTxtItem5() in the ActionForm, but searching the project for other substrings of "disTxtItem5" seemingly reveals nothing remotely related, though clearly somehow the framework is pulling a boolean from this string, which clear...
I have a class that uses filesystem entities to manipulate data. We have several methods specifically designed to (attempt to) cope with some of the issues we face with this approach (file locking, non-existent files, etc.). Ideally I'd like to be able to issue a warning if another developer attempts access the filesystem directly via ...
We're serializing/deserializing a class from XML and but there are properties and fields in the class which we want to exclude.
The System.NonSerialized and System.Xml.Serialization.XmlIgnore attributes seem to do the job but what's the difference between them? It seems we can use XmlIgnore on either properties or fields of the class. B...
I wonder if there is support in STL for this:
Say I have an class like this :
class Person
{
public:
int getAge() const;
double getIncome() const;
..
..
};
and a vector:
vector<Person*> people;
I would like to sort the vector of people by their age:
I know I can do it the following way:
class AgeCmp
{
public:
bool oper...