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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:48:47+00:00 2026-05-24T10:48:47+00:00

I have a button click event that adds text to a table. However, when

  • 0

I have a button click event that adds text to a table. However, when I submit the form the values entered into the table don’t appear in the postback… is this possible to do?

Here is my code:

    Protected Sub AddRowToInputTables(table As Table, value As String)
    If table IsNot Nothing Then
        Dim id As String = value.Trim()
        Dim prefix As String = ""
        If (table.ID = "cust_num") Then ' todo - abstract this out and use a parameter for the prefix instead
            prefix = "CN"
        Else
            prefix = "RN"
        End If
        If id <> String.Empty Then
            Dim tr = New TableRow()
            Dim td = New TableCell()
            Dim td2 = New TableCell()
            Dim btnDelete = New ImageButton()
            btnDelete.ID = "btn" & prefix & "_" & id & "_del"
            btnDelete.ImageUrl = "http://res.xxxxxxxx.net/images/delete.png" ' todo - put this in the web.config or settings file
            tr.ID = id
            td.Text = id
            td2.Controls.Add(btnDelete)
            tr.Cells.Add(td)
            tr.Cells.Add(td2)
            Dim rows = New List(Of TableRow)()
            For Each row In table.Rows
                rows.Add(row)
            Next
            rows.Add(tr)
            table.Rows.Clear()
            table.Rows.AddRange(rows.ToArray())
            cust_num_txt.Value = String.Empty
            res_num_txt.Value = String.Empty
        End If
    End If
End Sub
  • 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-24T10:48:48+00:00Added an answer on May 24, 2026 at 10:48 am

    Trick is to populate the table in the Load event only… then everything started working normally.

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

Sidebar

Related Questions

I have a button click event that takes information from controls and enters it
I have a jQuery question: I have an ADD button that adds text to
I have a form button with an onclick event that runs a simple javascript
I have a fairly simple code, a button click event, with the first line
I have the following code bound to the click event of a button: function
I have a problem when assigning functions to the click event of a button
I have added some dynamic textboxes upon a button click. I need the values
I have a form that adds rows in with the jQuery .afer() method (on
I have a button which adds new row in grid view at button click
I have a datagrid column that has Hyperlinkbuttons. You have to click the button

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.