2

I have a controls like this :

<asp:TextBox  ID="txtEnrollMember" placeholder="Please Enter Your Name"  runat="server" />

If current page's culture = "en-us" then the placeholder = "Please Enter Your Name"

If current page's culture = "zh-tw" then the placeholder = "請輸入你的姓名"


I am searching for a long time on google. But the related solutions is very few.

I've tried the solutions like this but not work.

How do I put hint in a asp:textbox


Wanted to know what would be the best way to do that?

Community
  • 1
  • 1
eleanar
  • 68
  • 8

1 Answers1

3

Simply use the App_LocalResources. Read the text for specific language and set the translation e.g. from code behind:

txtEnrollMember.Attributes["placeholder"] = "your transaltion";
lkurylo
  • 1,621
  • 33
  • 59