CSLA .NET
Vibrant discussion about CSLA .NET and using the framework to build great business applications.
Sign in
|
Join
|
Help
Home
Forums
Store
FAQ
Forums
»
CSLA .NET Framework
»
CSLA .NET discussion
»
Again : Enums as source of NameValueList
CSLA .NET Resources:
CSLA .NET home page
Frequently Asked Questions
Download CSLA .NET
CSLAcontrib project
Code generation index
Again : Enums as source of NameValueList
rated by 0 users
This post has 2 Replies | 0 Followers
Posts
13
Reply
saeedsamie
Posted: Fri, Oct 23 2009 2:12 PM
rated by 0 users
Hi,
I looked up in the forum and I found a good way for producing a NameValueList based on an Enum type and using [Description("friendly string")] attribute for displaying purposes. But for a multilingual application I need to use resource files for replacing "friendly string" appropriately. The problem is that when I make a reference to the resource file for getting the string I need I recieve a compilation error that says : "An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type ".
Does anybody has a soluton for it?
Posts
12
Reply
sixeyes
replied on
Fri, Oct 23 2009 2:29 PM
rated by 0 users
This is what we used:
http://www.codeproject.com/KB/cs/LocalizingEnums.aspx
It's automatic if you're using WinForms but if you're using ASP.NET (we were) you need a couple of lines to force type converters.
Iain
Posts
13
Reply
saeedsamie
replied on
Fri, Oct 23 2009 6:22 PM
rated by 0 users
Hi Iain,
It was very helpful.
Thanks
Previous
|
Next
Page 1 of 1 (3 items) |
RSS
Copyright (c) 2006-2010
Marimer LLC
. All rights reserved.
Email admin@lhotka.net for support.