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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mahesh ChandRank #1 · 393.3K reputationPosted Nov 30, 2022, 7:50 AM EST
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!
sathishRank #4,713 · 329 reputationPosted Nov 30, 2022, 7:55 AM EST
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#
Uttam KumarRank #1,076 · 1.8K reputationPosted Nov 30, 2022, 11:20 AM EST
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
Rajesh LoharRank #5,240 · 306 reputationPosted Dec 1, 2022, 2:16 AM EST
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,
Sachin SinghRank #66 · 26.2K reputationPosted Dec 8, 2022, 1:46 PM EST
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
Aravind GovindarajRank #430 · 5.8K reputationPosted Dec 8, 2022, 6:35 PM EST
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.