Setting properties in resource file

Total Post:104

Points:728
C#  Telerik 
 1143  View(s)
Ratings:
Rate this:

My site needs to be french and english and I am using resource files to accomplish this. My boss now wants to see sample text inside the text boxes. We are using telerik controls to do this and I am trying to set the sample text to either english or french.

I may have to make a custom control for this so I can have an extra label that is the sample text.

My question is: Can you set other properties besides the text property in the resource files.

ie: Label1Resource.EmptyMessage.Text

with resource set to: Empty message

  1. Post:89

    Points:629
    Re: Setting properties in resource file

    For local resources ASP.NET matches the attributes in the element:

    <asp:Label ID="lblErrorMsg" runat="server"meta:resourcekey="lblErrorMsg" Text="Label">  
    </asp:Label>

    So in the resource file you would define the localized text for "Text" as:

    name: lblErrorMsg.Text and value: Label

    If you have an attribute on the telrik control named EmptyText you would address that property in the resource file as such:

    name: lblErrorMsg.EmptyText value: Your text

      Modified On Apr-06-2018 11:14:04 PM

Answer