public void TextBox_GotFocus(object sender, RoutedEventArgs e) { TextBox tb = (TextBox)sender; tb.Text = string.Empty; tb.GotFocus -= TextBox_GotFocus; }
<asp:TextBox ID="new_range1" onChange="newobjCompute()" onFocus="this.value=''; return false;" runat="server" BorderWidth="0px" Height="47px" Width="90px" style="text-align: center">0</asp:TextBox>
<asp:TextBox ID="txt" runat="server" value="test" onfocus="if(this.value=='test')txt.value='';" onblur="if(this.value=='') this.value='test';"></asp:TextBox>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)