Dec 15
A simple method to highlight the text within a textbox control when the control gets the focus:
protected void Page_Load(object sender, EventArgs e)
{
//Add client javascript to highlight the value when the control receives the focus
txtMyTextBox.Attributes.Add("onfocus", "this.select();");
}
This is a nice and easy way to highlight a default value in a form or a search box.
I am relieved to find out that there is still a little good content to find on the internet. I’m so used to google giving me junk.
Thank you so much for making this available.
It seems like you’ve pulled together quite the respectable following nowadays. I’m happy!
Hello – I must say, I’m impressed with your site. I had no trouble navigating through all the tabs and information was very easy to access. I found what I wanted in no time at all. Pretty awesome. Would appreciate it if you add forums or something, it would be a perfect way for your clients to interact. Great job!