Text in textboxes.. RRS feed

  • Question

  • Hello everybody,

    How do i get the text into a textbox and once you click in that text box i'll go away and you can writte whatever you need to writte there.. It's actually same thing as you see here on this page - search textbox - It's saying 'Search MSDN with Bing'. Once you click on it goes away. This is axactly what I need to do. Can anybody help? Working with VS2010 Express C#..



    Wednesday, June 23, 2010 7:35 PM


  • What you are referring to is what is called an input box watermark.

    Check out the code at http://www.aspsnippets.com/Articles/Watermark-TextBox-using-JavaScript.aspx which describes how to achieve this with javascript.

    If you use jQuery there are script snippes out there which does the same thing.


    Search Enthusiast - MOSS MCTS
    http://techmikael.blogspot.com/ - http://www.comperio.no/
    • Marked as answer by SamAgain Wednesday, June 30, 2010 9:14 AM
    Wednesday, June 23, 2010 8:01 PM

All replies