How to add TableRow / TableCell to ASP.NET table from Javascript?

What's the best way to dynamically add TableRows and TableCells to an ASP.NET table from Javascript?




source to share

2 answers

I'm afraid your question is too vague to be fully answered. If you really want to create TableRow or TableCell objects, you will of course need to post back (no JavaScript needed) or make an AJAX (JavaScript) call to the server-side code. Anyway, it doesn't actually work JavaScript. If you just want to dynamically add a row to an HTML table rendered in a browser, you can accomplish that without any need for TableRow / TableCell abstractions from ASP.NET.

For a more complete answer, you should be more specific about what you are trying to accomplish.



Unless, of course, you are using as your server-side scripting language! -)



All Articles