C# 在自定义属性中使用资源文件数据批注

C# 在自定义属性中使用资源文件数据批注,c#,model-view-controller,C#,Model View Controller,我在视图模型中使用了资源文件,还为视图模型的绑定下拉列表使用了自定义属性。 我需要在其中添加键和值,例如:(1,(资源文件值))我可以实现吗 我试过: 我想: 什么是资源文件值?我的显示名称是志愿者Id,资源文件中的值像wise一样是“志愿者Id”。 [AdditionalMetadata("ControlId", "1")] [Display(Name = "VolunteerID",ResourceType = typeof(ECTMSResource))] [AdditionalMeta

我在视图模型中使用了资源文件,还为视图模型的绑定下拉列表使用了自定义属性。
我需要在其中添加键和值,例如:(1,(资源文件值))我可以实现吗

我试过: 我想:
什么是
资源文件值
?我的显示名称是志愿者Id,资源文件中的值像wise一样是“志愿者Id”。
[AdditionalMetadata("ControlId", "1")]
[Display(Name = "VolunteerID",ResourceType = typeof(ECTMSResource))]
[AdditionalMetadata("1",Resource file value)]