i create a new class which inherite the IResourceProvider,and register it in web.config
<globalization resourceProviderFactoryType="xx.xxx.xxxx" uiCulture="auto" enableClientBasedCulture="true"/>
this new class just implement
public GetObject(string resourceKey, CultureInfo culture)
{
....
}
which will get globalization text from my own db.
question is how i can use it in validation Attribute, such as below syntax:
[StringLength(5, ErrorMessageResourceType = typeof(Global), ErrorMessageResourceName = "StringLength")]
public string StringLength { get; set; }
and also how use it in view directly? in classic web form, i can just use
<asp:Literal ID="test" runat="server" Text="<%$ resources:Text,123 %>"></asp:Literal>
thanks