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

  • Home
  • SEARCH
  • 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 6645277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:16:02+00:00 2026-05-26T00:16:02+00:00

I am working on .net 2.0 I am populating a Grid View with multiple

  • 0

I am working on .net 2.0 I am populating a Grid View with multiple textboxes. The textbox has text change event. There is also a button with click event. The problem I am facing is that when the I enter the text in textbox and then click on button, the text change event gets fired, and the execution does not come to button click block. How can I detect if button has been clicked when both the events are fired.

There is the textbox with call to function for text change event

<asp:TextBox ID="txtChassis" runat="server" CssClass="form_text_box" AutoPostBack="true" OnTextChanged="Chassis_TextChanged"></asp:TextBox>

and also call to function for button click event.

<input class="form_button" id="btnSearch" title="Show Details" accesskey="S" type="submit"
                                                                    value="SAVE" name="btnSave" runat="server" onserverclick="btnSearch_ServerClick"/>

However, in case text is placed in textbox and button is clicked, then the text change event function gets called.

  • 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-26T00:16:02+00:00Added an answer on May 26, 2026 at 12:16 am

    Your Problem is, that events in ASP are only raised after a PostBack.
    The Post back happens if the Button is pressend, and the Client Posts Back (therfor the Name) his Data of the Fields.
    After this PostBack the Server (your application) calls all events that happend during the last Page_Load.
    As far as i know, there is no real order in which the events are thrown, but the textChanged event should be thrown anyway.
    If you want to hand your textChanged event directly after the Text hast changed you have to use “AutoPostBack” as Myat Thu already mentioned. Be aware that this increases your traffic signifficant, and can also change the flow of your code!
    I suggest designen the events indipendet so the user can hit the “PostBack Button” and all events are called at one post back. This saves traffic and load on the server.
    But this is just my personal oppinion.

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

Sidebar

Related Questions

I'm working in .net 3.5. I have a class A which has a stack
I am working with an ASP.NET MVC application. There is a requirement that a
Suppose this simple scenario: My client has an already working .net application and he/she
Is there an equivalent of PHP's strtotime() function working on .NET Framework. I'm talking
I'm working a .NET web service that will be processing a text file with
I'm working in .net c# and I have a string text = Whatever text
I'm working on my first ASP.NET MVC 3 application and I've got a View
i have a regular asp:button. I am working in .Net 3.5. I've tried adding
After working with .NET's HttpWebRequest / Response objects, I'd rather shoot myself than use
When I am working in .NET 2.0 projects with the newest version of ReSharper

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.