<%@ Page Language="C#" Debug="true" %>
<script runat="server">
protected void Page_Load( object sender, EventArgs e )
{
System.Data.DataView dv = (System.Data.DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
Response.Write(dv.Count.ToString());
}
</script>
<html>
<body>
<form id="Form1" runat="server">
<asp:GridView ID="CustomersGridView" DataSourceID="SqlDataSource1" AllowPaging="True"
SelectedIndex="0" runat="server">
</asp:GridView>
<br />
<asp:Label ID="Message" ForeColor="Red" runat="server" />
<asp:SqlDataSource ID="SqlDataSource1" SelectCommand="SELECT [CustomerID], [CompanyName], [Address] FROM [Customers]"
ConnectionString="Server=(local);Database=Northwind;Trusted_Connection=True;" runat="server"
DataSourceMode="DataSet" />
</form>
</body>
</html>
<script runat="server">
protected void Page_Load( object sender, EventArgs e )
{
System.Data.DataView dv = (System.Data.DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
Response.Write(dv.Count.ToString());
}
</script>
<html>
<body>
<form id="Form1" runat="server">
<asp:GridView ID="CustomersGridView" DataSourceID="SqlDataSource1" AllowPaging="True"
SelectedIndex="0" runat="server">
</asp:GridView>
<br />
<asp:Label ID="Message" ForeColor="Red" runat="server" />
<asp:SqlDataSource ID="SqlDataSource1" SelectCommand="SELECT [CustomerID], [CompanyName], [Address] FROM [Customers]"
ConnectionString="Server=(local);Database=Northwind;Trusted_Connection=True;" runat="server"
DataSourceMode="DataSet" />
</form>
</body>
</html>