MessageTemplateResourceType - Getting res. out of a database

Topics: Validation Application Block
Jun 28, 2012 at 11:00 AM


is there a way to get the resources from anywhere else than a .resx-file?
In my case I try to get em out of a database?

Is this possible?

Jun 29, 2012 at 6:51 AM

I don't think this is possible out of the box.  You could modify/extend the block to implement database resources.  

Another approach that I've used is to have a token (e.g. CAR_NAME_MANDATORY) as the MessageTemplate property and then before displaying the message template loop through all ValidationResults and perform a lookup from an external source to retrieve a localized string version.  Not sure if that fits with your design or not, though.

Randy Levy
Enterprise Library support engineer