just using javascript and add the event OnFocus on the textbox
you can implement in many ways:
when the user focus the textbox you delete all the value and present it as
new textbox
or when the user focus the textbox you delete all and if the user did not
changed the value you paste the old value back in the textbox
imagine that you have 2 textboxs called TextBox1 and TextBox2
onPageLoad add the onfous and onblur event to the textbox like:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
TextBox1.Attributes.Add("onfocus", "saveValue(this);")
TextBox1.Attributes.Add("onblur", "getValue(this);")
TextBox2.Attributes.Add("onfocus", "saveValue(this);")
TextBox2.Attributes.Add("onblur", "getValue(this);")
' for testing propose let's add some text on it
TextBox1.Text = "old value 1"
TextBox2.Text = "old value 2"
End Sub
and add the really simple javascript function:
<script language="javascript" type="text/javascript">
var oldValue = ''; // it will save our old values
function getValue( v ) {
if(v.value == '')
v.value = oldValue;
}
function saveValue( v ) {
oldValue = v.value;
v.value = '';
}
</script>
hope it helps