Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7700601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:44:47+00:00 2026-05-31T22:44:47+00:00

I have a form in which i have a text box for email and

  • 0

I have a form in which i have a text box for email and many other textboxes.
The email has a functionality that it should not match with previously entered email but it can be blank.

I fired my code at the text change event of the textbox and it is working fine.
But when i click on the update button without taking my cursor off the textbox.
The click of the button is not working.Only textchanged event of textbox fires nothing else happen.

Please help me with the same.

 string emailid = txtemail.Text;
var emailcnt2 = (from r in context.Customers
                                 where r.Email == Convert.ToString(emailid)
                                 select r).SingleOrDefault();

                if (emailcnt2 != null)
                {
                    lblemail.Text = "Email already exists for customer " + emailcnt2.FirstName + " " + emailcnt2.LastName + "";
                    //  emaildisplay.Attributes.Add("style", "display:block;");
                    txtemail.Focus();
                }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:44:49+00:00Added an answer on May 31, 2026 at 10:44 pm

    I looked on project where I had this issue and the “hack” was to put the textbox inside an UpdatePanel, it seems it works in most of the cases ( I had tests when the button click didn’t fire, but they were few, actually very rare).

    I can’t tell exactly why it works, I don’t have a certain or valid explanation, but probably is because the UpdatePanel makes its own request, while the form submit it’s just another request.

    Going further, I’m trying to think to an explanation of this behavior. It seems the TextChanged event is really firing when the text is changed (hilarious, no?). We expect this event to fire at onblur moment, if it’s the case, ie the text changed, but when some other button is clicked, probably the javascript generated by ASP .Net checks if the text is changed and then submits the form to fire this event. The button click is lost now, because a form cannot be submitted twice.

    Now, what UpdatePanel brings is that it has the responsibility to fire the TextChanged event, so the button click is now fired as usual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form in which there are many textBoxes from which three textboxes
I have a text box(txt_to) which has values seperated by ; How can I
I have a form in which I have 30 input boxes and 10 text
I have a form with a textarea. Users enter a block of text which
I have a an HTML form which contains the YAHOO rich text editor on
I have the following text input on a budget calculator form which displays the
I have a form which has a lot of SELECTs. For various reasons, I'd
I have a Windows form that's generated using code (including buttons and what not).
I have a form which will include some optional questions that need to asked
i have a form which asks for a variety of numbers how many apples

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.