Uisng Datagrid

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a legacy asp page with a list of records displayed as a table. I
would like to convert this page to asp.net and use data grid instead. What
do I need to do to achieve this from what I have to having the data
displayed in a grid?

Thanks

Regards
 
John

In legacy ASP, you normally open a recordset to the table and in a While
loop display the fields in <td> tags and use MoveNext, right?

To change to DataGrid, remove that code. Insert a Datagrid element. In the
Page_Load event, open the table and set the Datagrid's Datasource property
to the table.

If you want selected fields only, not the entire table, put Column tags
within the Datagrid tag.

Regards
Hussain
 
Back
Top