.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Code Snippets >> JQuery >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Create watermark in textbox using JQuery in asp.net

Posted By:Amit Mehra       Posted Date: March 24, 2010    Points: 10    Category: JQuery    URL: http://www.dotnetspark.com  

Create watermark in textbox using JQuery in asp.net. In this code we add remove text from tex tbox on onfocus and onblur event.

If you would like to have watermark in your textbox in asp.net to guide user to understand the functionality of the textbox than you can achieve that using JQuery with few lines of code.

In the below example I have used css and JQuery to create watermark effect in the textbox. In this example when user place the cursor than text will be removed from the text box and the css class will be normal, Again whithout entering if user leave the textbox than again watermark will be assign back in the textbox.

In the below example I have taken a asp.net textbox

and here is the JQuery code to craete watermark

    Reset Button using JQuery in ASP.Net



Further Readings:

Author: Rajesh         Company URL: http://www.dotnetspark.com
Posted Date: December 23, 2010

There is another Free Control Available Online for Watermarked Textbox

This tool helps to provide generate watermark in textbox in ASP.Net.

In this Control Watermark may be as type of text or image in behind of textbox.

Download from the following link.


Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend