# Default text text in Textbox in ASP.net



## binay00713 (Apr 22, 2011)

*I am using asp.net (c#)
I want to to display some default text(in blur) in a textbox when the page loads like
" write here"
and when the user clicks on the textbox to write ,it should be erased automatically.
How to do it?
*


----------



## krishnandu.sarkar (Apr 22, 2011)

This is called Water Mark. Check it out *digitalbush.com/projects/watermark-input-plugin/
Your second query is also solved in that link.

Otherwise you can use Javascript onClick() event, and just clear it by document.GetElementByID("Textbox1").value = "";

But better follow the jQuery one.


----------



## Garbage (Apr 22, 2011)

One more thing you can do it set the default text as "Enter something here", and onFocus, make the text "".


----------



## krishnandu.sarkar (Apr 22, 2011)

Garbage said:


> One more thing you can do it set the default text as "Enter something here", and onFocus, make the text "".



Ya, but he wants the default text to be greyed out. Like our TDF "Forum Search" box.


----------

