• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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