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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:49:26+00:00 2026-05-10T22:49:26+00:00

I have code in an Update Panel and even though on a button click

  • 0

I have code in an Update Panel and even though on a button click i am inserting data into a db and simply calling Updatepanel.Update() the whole page is reloaded:

Gifts.ASPX

<table style='width:100%;'>             <tr>                 <td>                     <asp:Label ID='Label2' runat='server' Text='Gift'></asp:Label>                 </td>                 <td> <asp:UpdatePanel ID='UpdatePanel3' runat='server' UpdateMode='Conditional'>     <ContentTemplate>                     <asp:TextBox ID='txtNewGift' runat='server'></asp:TextBox>     </ContentTemplate> </asp:UpdatePanel>                 </td>             </tr>             <tr> 

Gifts.aspx.CS

protected void cmdAddGift_Click(object sender, EventArgs e) {     OleDbConnection objConn = new OleDbConnection(DataSource);      Random r = new Random();     int giftID = r.Next(1200, 14000);      OleDbCommand objCommand = new OleDbCommand('Insert into Gifts (GiftID, Description) values (' + giftID + ','' + txtNewGift.Text + '')', objConn);     ExecuteCommand(objCommand);      PopulateGifts(objConn);      txtNewGift.Text = '';     UpdatePanel3.Update(); } 

Any ideas why this whole page would reload instead of just the textbox getting update?

  • 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. 2026-05-10T22:49:27+00:00Added an answer on May 10, 2026 at 10:49 pm

    Where is the button on Gifts.ASPX? If you put the button inside the UpdatePanel or use triggers you don’t need to call UpdatePanel3.Update(); from the code behind.

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

Sidebar

Ask A Question

Stats

  • Questions 61k
  • Answers 61k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I recommend the Force.com Migration Tool. For reference: Force.com Migration… May 11, 2026 at 9:38 am
  • added an answer Is there any compiler setting or other way to force… May 11, 2026 at 9:38 am
  • added an answer Is there a way to cause that generated code to… May 11, 2026 at 9:38 am

Related Questions

I have code in an Update Panel and even though on a button click
I have some code in an IAuthorizationFilter which redirects the user to a login
I have the following code in an Autofac Module that is used in my
I have code similar to this filtering entries in an Array of Objects: var
I have seen the following methods of putting JavaScript code in an <a> tag:
I have the following code in my Site.Master page of an almost empty ASP.NET
I have written some code in my VB.NET application to send an HTML e-mail
I have an application that allows users to write their own code in a
I have the source code of an application written in C++ and I just
I have an odd edge case right now in that a response code from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.