调用了 Page.DataBind()方法了没有?
解决方案 »
- sqlserver2000存储过程高效率分页有几种比较经典的,能支持多条件排序的
- 未能加载文件或程序集“Excel”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x80070020)
- 高手,你们在哪里
- string myscript=@"function alerthello()....." @是什么意思
- 这个数组asp.net(C#)怎么写
- 关于多用户同时修改数据库的问题。
- 用户控件中的form怎么处理
- 如何在服务器端操作EXCEL表
- 請問如何在ASP.NET中找到C:\Windows C:\WINNT ?
- B/S下的TreeView动态增加节点?
- string.Format中的一个小问题,很简单
- 我该怎样转换数据库得到的int转为字符串?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在此处放置初始化页的用户代码
Page.DataBind()
End Sub
但还是不行。
datagrid.datasource=a["dbname"]
Page.DataBind()
{
SqlConnection sqlconnly=new SqlConnection("Server=192.168.50.10;uid=rsgl;pwd=tangjun;database=tc");
SqlDataAdapter sqladply=new SqlDataAdapter ("select * from ly",sqlconnly);
dsLy.Clear();
sqladply.Fill(dsLy,"ly");
this.DgLy.DataSource=dsLy;
this.DgLy.DataBind();
int pagecount=this.DgLy.PageCount;
this.DgLy.CurrentPageIndex =pagecount-1;
this.DataBind();
return true;
}