In ASP.NET MVC the code for doing this is by using java-script in razor view like in the next example:
@Html.TextBox("searchValue", Session["SearchValue"] == null || ((string)Session["SearchValue"]).Length == 0 ? Resources.Resource.SearchLabel : (string)Session["SearchValue"], new { @class = "quickSearchTextBox", onFocus = "if (this.value=='" + Resources.Resource.SearchLabel + "') this.value='';"})
The idea is to test if the user input something (or delete all) in the text box, and in the case there is no input to show a message hint, otherwise to keep the user input. In the code above I keep in the Session the value input by user to not lost it between post backs.