By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,046 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,046 IT Pros & Developers. It's quick & easy.

how to clear textbox value when textbox clicked in asp.net, c#

P: 2
hi, my textbox contains text as "search" on pageload when the user click the textbox the text "search" should disappear and the textbox must get the value of the user entering text. please help the guide for this event in asp.net c#
Jun 21 '07 #1
Share this Question
Share on Google+
2 Replies


10K+
P: 13,264
hi, my textbox contains text as "search" on pageload when the user click the textbox the text "search" should disappear and the textbox must get the value of the user entering text. please help the guide for this event in asp.net c#
Hi and welcome to TSDN. Hope you'll have a great time here. I'll move this to the .NET forum where the experts there can help out.
Jun 21 '07 #2

nateraaaa
Expert 100+
P: 663
hi, my textbox contains text as "search" on pageload when the user click the textbox the text "search" should disappear and the textbox must get the value of the user entering text. please help the guide for this event in asp.net c#
You can do this using javascript or you can use the onTextChanged event of the textbox to clear the text within your textbox. I am assuming there is a button also on your page to execute the search. In the click event of your button you will want to check to see if the text in your textbox is = to "search" if not then pass this value to your stored procedure to execute your search.

Nathan
Jun 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.