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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:43:29+00:00 2026-06-11T06:43:29+00:00

I am trying to display a table dynamically loaded from database with dynamically created

  • 0

I am trying to display a table dynamically loaded from database with dynamically created button in the first cell of each row. Each button has assigned ROW_ID value that uniquely identifies the button in one “generic” method handler.

As far as I can understand the only way I can do this is by loading data and displaying it & wiring-up buttons to handler during Init life-cycle phase. The problem I am facing is when this button would (for example purposes) were to call delete (or other modification) procedure in the database for that particular row I would have to do Response.End and reload the page to reflect this modification, because during PostBack handlers its already too late to re-fetch new dataset from DB and create new set of buttons and wire it to the handler. Full page reload however losses state for all controls, which is not desirable.

One thing to note: I am using custom-render user control to display the resultset from database (it looks like a table though). I am not using DataGridView with DataBinding.

Possible solution would be to use radio-button for each row and one static button in the bottom, but this is far from ideal.

The questions is: Whats better way to do this? Am I missing something? I find it hard to believe that ASP.NET would be this cumbersome to handle this generic use case.

Thanks for any possible suggestions.

  • 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-11T06:43:31+00:00Added an answer on June 11, 2026 at 6:43 am

    The solution I have ended-up with is to use JavaScript based __doPostBack( ‘static_button_id’, ‘row_id’ ) on a dummy button for each row. It generates postback with argument that identifies the row for which this post-back occurred.

    Button (ID=static_button_id) is derived classical button that is hidden on the page via style=”display:none;” and on click calls custom handler (assigned during init/load phase). Its derived to circumvent the postback validation of arguments.

    To retrieve parameter (row_id) inside a .NET handler I use:
    string passedArgument = Request.Params.Get(“__EVENTARGUMENT”);

    It does exactly what I need, but its somewhat dirty. I would still appreciate if anyone offered the clean way to do this.

    Thanks.

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

Sidebar

Related Questions

I'm trying to display a table where each table row has a rounded border.
I am trying to display a table containing data from my db in a
OK folks, I am trying to display the contents of a database table along
I am trying to retrieve a column from another related table, and display that
I'm having a problem while trying to dynamically change a table cell's styling class
I am trying to display all of the records from a database in phpMyAdmin.
I am trying to use display:table, table-row to get a final output as below.
I have created a table in OpenEdge using ABL. I'm now trying to display
I'm trying to display an SWT table inside a form section, but am having
I'm trying to create a layout with display: table and alike, but it seems

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.