TextBox with Default value

asp.net, textbox

Solution

If you are working on newer browsers then you can use `placeholder` property which is new in HTML 5

<asp:TextBox ID="textBox1" runat="server" placeholder="Someone@exmaple.com"></asp:TextBox>

otherwise you can also use `onfocus` and `onblur` event to do this as described here

Problem

I want to use a textbox that shows a text. For example : Someone@example.com. When the user clicks on it, the textbox is cleared and ready for the user to type.

Original source

Related problems