textbox events
-
I need a textbox which displays some message, say "Enter Text". When someone clicks on it that message should be cleared and should be ready to enter some other text. Which event of the textbox should I use for it?
-
I need a textbox which displays some message, say "Enter Text". When someone clicks on it that message should be cleared and should be ready to enter some other text. Which event of the textbox should I use for it?
You can use javascript on that. Onblur event of textbox you can clear textbox value.
People Laugh on me Because i am Different but i Laugh on them Because they all are same.
-
I need a textbox which displays some message, say "Enter Text". When someone clicks on it that message should be cleared and should be ready to enter some other text. Which event of the textbox should I use for it?
-
I need a textbox which displays some message, say "Enter Text". When someone clicks on it that message should be cleared and should be ready to enter some other text. Which event of the textbox should I use for it?
OnClick JS event
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
I need a textbox which displays some message, say "Enter Text". When someone clicks on it that message should be cleared and should be ready to enter some other text. Which event of the textbox should I use for it?
Hi, It is better to use a client side script for this.You can use the following javascript code and call the same in the OnFocus event of the textbox. Insert this js in the aspx page in a script tag.
function clearText(txtId) { if(document.getElementById(txtId).value=="Enter Text") { document.getElementById(txtId).value=""; } }
And add this code to the codebehind file.TextBox1.Attributes.Add("OnFocus", "clearText('" + TextBox1.ClientID + "')");
Do let me know if you need more info. Cheers...Happy Programming, Vimal Raj MCAD.Net www.techisolutions.blogspot.com
-
I need a textbox which displays some message, say "Enter Text". When someone clicks on it that message should be cleared and should be ready to enter some other text. Which event of the textbox should I use for it?
But if I want to use that textbox within update panel?
-
But if I want to use that textbox within update panel?