Interview Questions → ADO.NET 2.0 → ADO.NET Questionnaire I
ADO.NET Questionnaire I
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<your_connection_string>"
DataSourceMode="DataReader"
SelectCommand="SELECT * FROM [Subjects]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AllowSorting="true">
</asp:GridView>