Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want the javascript code to add watermark in textboxes like its in twitter and facebook. same as search box in this link here
Posted
Updated 6-Mar-14 18:30pm
v2

just add placeholder attribut to your .aspx code of textbox

e.g:- <asp:textbox id="txtboxshow" runat="server" placeholder="watermarkname">
 
Share this answer
 
v2
Comments
jayraj86 7-Mar-14 1:07am    
Thank you Pranav.
it's simple. No need to use java script or jquery just add placeholder="your water mark" on your textbox control


C#
<asp:TextBox ID="TextBox1" runat="server" placeholder="mywatermark"></asp:TextBox>
 
Share this answer
 
v3
Comments
jayraj86 7-Mar-14 0:50am    
Thank you so much! :)
JB0301 7-Mar-14 0:52am    
you're welcome
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900