Articles → ADO.NET → Sqldatasourcemode Enum In Sqldatasource

Sqldatasourcemode Enum In Sqldatasource






Sqldatasourcemode Enum




  1. DataReader
  2. DataSet

Datareader Mode





Dataset Mode





Example




<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>




Picture showing the error message when user do the sorting in datareader mode



Posted By  -  Karan Gupta
 
Posted On  -  Saturday, September 21, 2024

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250