【发布时间】:2015-03-05 04:39:13
【问题描述】:
我有一个TextBox,我想在其中显示我的GridView 中的条目数。
count2.Text += (GV.Rows.Count).ToString();
分页已启用,但它只计算第一页中的条目。
我如何确保它计算所有条目?
我试过这个:
<asp:SqlDataSource ProviderName="System.Data.SqlClient" ID = "sourceProducts" runat = "server" ConnectionString =" <%$ ConnectionStrings:DB %> " SelectCommand = "myqueryhere" OnSelected="sourceProducts_Selected">
protected void sourceProducts_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
z = e.AffectedRows;
}
但这给了我一些错误的价值
【问题讨论】: