The server then deconstructs the GridView into a DataTable, adds a row to the DataTable, binds it to the GridView, and then sends it back to the client...
Can it be simpler?
When using Ajax data to request data, it is usually in a simple format, such as String, with less information. Of course, you can also request XML back, but XML data is much redundant, and getting it to the client for processing is much more troublesome than json.
Can it be simpler?
The above problems can be easily solved if the DataTable and JSON types can be easily converted to each other.
Advantages: 1) Avoid unnecessary postbacks;
2) Streamline the size of asynchronous request data;
3) Solve the problem of tedious data sending and receiving when the amount of data is large.
Since there are so many benefits, let’s get into the code.
Front-end code: