1

On my website I am having a text-box and I want to give it this type of functionality:

http://kyleschaeffer.com/best-practices/input-prompt-text/

On the above website javascript code is given but how can I actually combine it with my asp.net text-box server control. Also the initial text which I want to assign it will be coming from code behind.

1
  • Also, make sure jQuery is working. Commented Dec 12, 2011 at 21:43

1 Answer 1

1

You just need to set the title on your textbox like this:

myTextBox.Attributes["Title"] = "The Watermark Goes Here!";
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks buddy. I will give your approach a shot and see if it works out.
Hi Blankasaurus, sorry for late reply. Yes it worked perfectly. Thanks for your time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.