用户名:
密 码: 记住
您当前的位置:首页 > 网络编程 > Net教程

让GridView只显示特定用户的数据的方法

时间:2015-01-29  来源:互联网  作者:佚名
1、新建一个Label1来储存username,这个是我这个方法成功的关键,因为我尝试用Session("username")失败。
改用control 来传递变量,成功!
2、“GridView tasks”--“configure Data Source”--一路next下去---到了“Define Custom Statements or Stored Procedures”窗口。把SQL Selete 语句
SELECT CourseId, Description, [Content], ContentType, ContentSize, Sendor, FileName, FileTime FROM Course
改为
SELECT CourseId, Description, [Content], ContentType, ContentSize, Sendor, FileName, FileTime FROM Course WHERE (Sendor = @username)
2、点Next到如下窗口,设置如图:


最后:我的username都是用Membership函数获得的
来顶一下
返回首页
返回首页
推荐资讯
让GridView只显示特定用户的数据的方法 让GridView只显示特定用户的数据的1、新建一个Label1来储存username,这个是我这个方法成功的关
让GridView只更新某些特定的数据的方法 让GridView只更新某些特定的数据的1、我要显示完整的数据 2、然而我又不希望所有的数据都可以修
相关文章
栏目更新
栏目热门