hi
I use below code for put watermark for textbox:
<asp:TextBox ID="Txtage" runat="server" CssClass="txtage" ForeColor="#443f13" onblur="WaterMark(this, event,'enter name');" onfocus="WaterMark(this, event,'enter name');" Text="enter name" onpaste="return false;"></asp:TextBox>
and insert it into database:
_cmd.Parameters.AddWithValue("@age", Txtage.Text);
now problem is that if users doesn't enter any text in textbox it will insert watermark text into database ( "enter name")
but I want if users doesn't type any text into textbox it doesn't insert any thing in databse...
best regards
neda