Hi,
I have a existing HTML table with headers, how to update the values to it every time in C#
| ID | Name | Class |
Thanks
Hi,
I have a existing HTML table with headers, how to update the values to it every time in C#
| ID | Name | Class |
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Aravind GovindarajPosted Dec 8, 2022, 11:35 PM
I hope u r using client side html, if u r using javascript to bind the data.
Consider you have header, body , under body u have list of tr tags. Whenever u r going to bind new data execute $bodytag.clear then bind u r new data into table body. So that u will get only fresh record.
Sachin SinghPosted Dec 8, 2022, 6:46 PM
Are you using any database to store the value?
Then open a popup with current row values and let user update the value, on update click save the data in DB. then rebind the table using get request with ID of that row.
https://www.sharpencode.com/HowToTopic/how-to-retrieve-selected-table-row-cell-values-and-display-in-bootstrap-modal-pop
Rajesh LoharPosted Dec 1, 2022, 7:16 AM
Hi,
If you are using Asp.net WebForms, then convert HTML table into server control using "runat" tag and then manage it from code behind using c#.
Thanks,
Uttam KumarPosted Nov 30, 2022, 4:20 PM
You can bind it with a data source that will be updating table data upon binding. Please go through the link below for reference.
https://www.aspsnippets.com/Articles/Bind-data-from-Database-in-HTML-Table-in-ASPNet-using-C-and-VBNet.aspx
sathishPosted Nov 30, 2022, 12:55 PM
I have a existing HTML table with headers, how to update the values to it every time in C#
It should clear and update with new record on same columns in C#
Mahesh ChandPosted Nov 30, 2022, 12:50 PM
Please post questions that are complete. For example - How to update values in HTML table when a new record is added? OR something like that. Cheers!