• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

How do I clear a textbox after a postback then allow another post back in VB.net

I have a textbox that is set to auto post back. When text is entered and enter is hit the textbox change event is fired. In the textbox change event I read the text in the textbox then clear the textbox and give it focus again. This all works fine. My problem is after the text is cleared I can't get the change event to fire unless I click out of the textbox and then click back in the textbox. Is there some work around this.
0
whiwex
Asked:
whiwex
  • 3
  • 2
1 Solution
 
CodeCruiserCommented:
What are you doing in the code behind? Is it something that can be done in client side?
0
 
whiwexAuthor Commented:
Basically take the contents of the textbox and search a database if it's not found in the database I add it to the database clear the textbox and set the focus back to the textbox. The problem is if I enter text into the textbox a second time I have to click out of the textbox then click back into the text and hit enter for the change event to fire.
0
 
whiwexAuthor Commented:
Here is what I found. I have a ajax calendar extender on the page. If I remove the calendar extender everyting works. If I add the extender I have to click out of the textbox then back into it. The problem is with the calendar extender.
0
 
CodeCruiserCommented:
Can you live without the calendar extender?
0
 
whiwexAuthor Commented:
I could live without it but rather not. I'm searching the internet for a fix
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now