how to put default value in textbox and on keypress remove it value="0" onfocus="if (this.value === '0') this.value = ''" onblur="if(this.value === '') this.value = '0';" <asp:TextBox ID="txt_compvalue" runat="server" value="0" onfocus="if (this.value === '0') this.value = ''" onblur="if(this.value === '') this.value = '0';" Width="45%"></asp:TextBox>
<asp:TextBox id="TextBox1" Text="Default value" runat="server" onclick="this.value='';" onblur="this.value='Default value';"/>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)