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 6223837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:33:35+00:00 2026-05-24T08:33:35+00:00

Hello there I have an updatepanel setup. I have set its update mode to

  • 0

Hello there I have an updatepanel setup. I have set its update mode to be conditional so that it only fires when the trigger events happens. Inside the updatepanel I have set the triggers to be some image controls and the event name to be click. Everything’s fine till now.

But now I have also a textbox setup. When ever I enter some other text and press enter it causes the postback and the update panel takes control. Even though I have set the autoPostBack property of the textbox to be false and the updatePanel UpdateMode to be Conditional. Could somebody please point out the problem. What am I doing wrong? I only want the updatepanel to take charge when the trigger events occur for this updatePanel

Here’s my code for updatepanel and textBox . .

        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ImageButtonLeftArrow" EventName="click" />
                <asp:AsyncPostBackTrigger ControlID="ImageButtonRightArrow" EventName="click" />
            </Triggers>
            <ContentTemplate>

                <asp:AdRotator ID="AdRotator1" runat="server"
                AdvertisementFile="~/MainImages.xml" Height="650" Width="934" 
                onadcreated="AdRotator1_AdCreated" CssClass="borderClassForAdRotator" />

                <asp:UpdateProgress ID="UpdateProgress1" runat="server" >
                    <ProgressTemplate>
                        <div >
                        <img src="images/loading.gif" class="overLayImage" />
                        </div>
                    </ProgressTemplate>
                </asp:UpdateProgress>

            </ContentTemplate>
        </asp:UpdatePanel>
 <asp:TextBox ID="search" CssClass="search" runat="server" AutoPostBack="false" ></asp:TextBox>
  • 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-24T08:33:36+00:00Added an answer on May 24, 2026 at 8:33 am

    Do you have a submit button setup too on the page? Hitting enter is causing the form submit and hence, UpdatePanel could be performing the update.

    If you’re not sure, post your full HTML and JS here.

    Update: Also, if this is the only textbox on the page, the Submit on Enter is the default behavior. In that case, add a eventhandler to cancel the default behvior like this:

    JS:

    <script type="text/javascript">
        function disableSubmitOnEnter(e)
         {
             var key;      
             if(window.event)
                   key = window.event.keyCode; //IE
              else
                   key = e.which; //firefox      
    
             return (key != 13);
         }
    </script>
    

    codebehind:

    search.Attributes.Add("onkeypress", "return disableSubmitOnEnter();");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Foobar class with a sayHello() method that outputs Well hello there!.
Oh hello there, fellow SO members, I have a web service that returns XML
Hello there I have a database that has 2 tables in it, one is
Hello there I have a really complex php script that produces a javascript file
Hello is there a class that does a pretty conversion?
I have a string, Hello there I have a question I want to delete
Hello there i have written some code in jquery to add new input type
I have a div: <div> Hello there <img src=cnnc.png /> </div> <div id=cart> <div
hello there is something i've realized with quartz when working.Say a cron is set
say I have the following string: "Hello there. My name is Fred. I am

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.