DomainObjects Class Library

Field.GetKey Method 

Get a string representation of the hashcode that uniquely identifies this field instance. This field becomes cached in one of two caches when GetKey is called:

1. If the current thread is executing within an HTTP context, i.e., a web application, then the field is stored in the current HttpSessionState.

2. If the current thread is not executing within an HTTP context, then the field is stored in DomainObject's AppDomain cache.

This field can then be retrieved later via a call to GetField.

You might want to use the field key as the value of a drop down list in a web page and then retrieve the actual field from the cache when the page is posted back to the server. See a usage example at FieldCaching().
public string GetKey();

See Also

Field Class | DomainObjects.Facade.Command.Expression Namespace