CodePudding user response:
Originally the query code directly to the background of dal inside, and then assign to check the data to the data source is not good ah, don't spray of new rightCodePudding user response:
Define a datatable, the result of check the assignment for the datatable variables, and then put the listview data source is specified for the datatable variables, then execute the databind ();For example,
The datatable dt=your query () method returns the datatable
ListView1. The DataSource=dt;
ListView1. DataBind ();
At the front desk you should how to write a template binding field.
CodePudding user response: