开发者

asp.net: using resource expressions with the resources in a separate project

开发者 https://www.devze.com 2023-01-21 21:58 出处:网络
I\'m pretty sure this is something super easy, but how do i access a resource that is in a separate project using the expression syntax?

I'm pretty sure this is something super easy, but how do i access a resource that is in a separate project using the expression syntax? I thought it would be like so:

<%$ Resources:SomeNamespace.Resources.Web, PleaseSelectAnImage %>

where SomeNamespace.Resources is the project that the resources are located in.

i normally just do <%= SomeNamespace.Resources.Web.PleaseSelectAnImage%> but i need to have this inside a control.

 <kw:SlickUpload ID="SlickUpload1" runat="server" 
            ValidExtensions=".png, .gif, .jpg" 
            InvalidExtensionMessage="<%$ Resources:SomeNamespace.Resources.Resources.Web, PleaseSelectAnImage %>" >

so when i just do what i normally do, it puts '<%= SomeNamespace.Resources.Web.PleaseSelectAnImage%>" literally.

my project name i开发者_如何转开发s SomeNamespace.Resources. the resource file name is Web. and the key is PleaseSelectAnImage.


Patricia, you'll need to implement a custom ResourceProviderFactory and corresponding IResourceProvider in order to do this. Some good reference can be found here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号