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

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

ASP.Net TextBox Leave event..

Posted By: susant     Posted Date: October 07, 2008    Points:2   Category :ASP.Net
i want to fire textbox leave event in asp2.0

how can i?

please give me a solution as soon as possible.

thanks in advance.

Author: Rahul             
Posted Date: October 07, 2008     Points: 5   

you can use javascript "onblur" event. to fire this event from code behind in page_load event.


Author: susant             
Posted Date: October 07, 2008     Points: 5   

Hi Rahul, Actually my requirement is like that..

I have one form name reg.aspx...
In TextBox1 the user will enter the user name.. So i want to run one query like:

select user_id from <table> where user_id= textBox1.text;

so what will happen if the user is already exist in db then it will display user exist else.....

So for this i need to write one event for textbox leaave event.. as soon as the user will press tab key ya any moment he is leaving the textbox1 the textbox_leave event will fire..


Author: Rahul             
Posted Date: October 08, 2008     Points: 5   

Hi Susant,
You can use Ajax to check user name and you can use "onkeyup" event of TextBox. Check this article for code.


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

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