Home > DeveloperSection > Forums > Setting properties in resource file
marcel ethan
marcel ethan

Total Post:105

Posted on    November-20-2014 2:44 AM

 ASP.Net C#  Telerik 

 1 Reply(s)
 820  View(s)
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

Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    November-20-2014 6:07 AM

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

<asp:Label ID="lblErrorMsg" runat="server" meta:resourcekey="lblErrorMsg" Text="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

Don't want to miss updates? Please click the below button!

Follow MindStick