无为清净楼资源网 Design By www.qnjia.com
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到如下窗口,设置如图:
让GridView只显示特定用户的数据的方法
最后:我的username都是用Membership函数获得的
标签:
GridView

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com