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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:24:23+00:00 2026-06-03T01:24:23+00:00

I have an UpdatePanel control in my ASP.NET application (actually several, but that’s not

  • 0

I have an UpdatePanel control in my ASP.NET application (actually several, but that’s not the concern).

<asp:UpdatePanel ID="UpdatePanelDetail" runat="server" UpdateMode="Conditional">
<ContentTemplate>
...More code here

Inside the panel, there exists an asp:Table object:

<asp:Table ID="tblGIFs" runat="server"></asp:table>

This table gets programmatically generated via some code from codebehind:

TableRow htr = new TableRow();
TableCell htc = new TableCell();
...<snip>
tblGIFs.Rows.Add(htr)

And that’s all fine, except in one of the cells I am trying to add a button (with an image):

htc3.Text = "<input ID=\""+ii.Value+"\" OnClick = \"btnGIFSearch(this)\" type=\"image\" value=\"/Image/Fiu.png\" />";

When this image is clicked, the onclick fires fine, but the entire UpdatePanel gets refreshed (and consequentually, the asp:Table disappears).

If I use a type="button", it works completely fine and there’s no issue with refreshing/losing the content in the table.

I’ve run the page with breakpoints on every location that I’m touching the table from codebehind to no avail, there’s really nothing more that I can see that could cause the UpdatePanel to be cleared programtically.

Anyone seen similar behavior with these tags/controls and any idea of a resolution? A workaround is obviously using type=button and just styling the button, but I rather not do that if I can get type=image behaving correctly.

  • 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-06-03T01:24:24+00:00Added an answer on June 3, 2026 at 1:24 am

    Solved with dynamically created controls.

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

Sidebar

Related Questions

When I have a regular textbox in a UpdatePanel (not an ASP.NET control) with
I have a Asp.Net control inside a updatepanel thet is inside a modal popup.
I have an ASP.NET Page that contains a User control called ReportCtrl (my own
I have a legacy code that uses asp.net updatepanel to load some pagination items.
I have an ASP.Net CheckBoxList control inside an Ajax UpdatePanel. I will include the
I have been using the ASP.NET AJAX UpdatePanel control a lot lately for some
I have a html input control within a asp:UpdatePanel and I have its associated
Basically, I have created a custom control that uses an UpdatePanel, and as I
I have a asp:UpdatePanel with a asp:Button and a asp:TextBox : <asp:UpdatePanel ID=UpdatePanel1 runat=server>
So, we have an ASP.Net application - fairly standard - and in there are

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.