In many of my fields I want to write some text (sort of help, format, watermark) type of text in my TextBox. For instance, in a date textbox, I want to show the format "dd/mm/yyyy" and when user in on the textbox it disappears & if the textbox is empty then it appears.
I believe their is some simple method to do this, but I can't find out. I tried
[Display(Name = "First Name *", Prompt = "First Name")]
but it doesn't work. Google'd lot for the same but didn't get any answer as I want to. In Login, in Email box, their should be "[email protected]" text.
Can you help me identify what is the key to achieve this functionality.
Thanks

Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Apr 1, 2015, 5:40 PM EDT
like
TextBox Name="myTextBox" TextChanged="OnTextBoxTextChanged" placeholder="[email protected]" Width="200"> TextBox> or you want to add watermark then you can use this link https://msdn.microsoft.com/en-us/library/bb613590%28v=vs.110%29.aspxRahul PrajapatRank #1,209 · 1.5K reputationPosted Apr 1, 2015, 5:29 PM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 1, 2015, 7:43 PM EDT
Placeholder="your watermark text"
Akhil GargRank #772 · 3K reputationPosted Apr 1, 2015, 8:54 AM EDT
Terry146 reputationPosted Apr 1, 2015, 10:12 PM EDT
Don't want to add so many images.
Terry146 reputationPosted Apr 1, 2015, 10:12 PM EDT
You all have provided the correct answer. As Pankaj has provided with code, so am accepting his reply as answer. Please.
Thanks to all of you.
Terry146 reputationPosted Apr 1, 2015, 10:18 PM EDT
Thanks.
Jaipal ReddyRank #588 · 4.1K reputationPosted Jun 19, 2015, 10:03 PM EDT