本文介绍了如何获取特定的用户详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,如何在登录后获取更多的用户详细信息?
只是查询还是存储过程?
tblTable1
sbidID int sbidDID varchar(20) sbidDocType varchar(4) sbidUserID int
来自tblTable1的记录
1 88 诺基亚 146
tblTableLogin
linLoginID linUserGroupID linUserDetailsID linLoginName linPassword 1个 1 admin admin 146 1 146 shahid shahid
所以登录后我想在登录到特定用户ID后在网格中显示记录..使用linUsrDetailsID或linLoginID
我想从tblTable1获取记录,以使用其linUserDetailsID在网格中显示记录
请帮我谢谢.登录后将Userid分配到会话中
字符串strSQL = " 从tblTable1中选择*,其中sbidUserID = @ UserID" SqlCommand sqlcommand =新的SqlCommand(sql,sqlconn); sqlcommand.CommandType = CommandType.文本; sqlcommand.CommandText = sql; sqlcommand.Parameters.添加(新的SqlParameter(" @ UserID ",会话[" uid"].ToString())); SqlDataAdapter da =新的SqlDataAdapter(sql,sqlconn); da.Fill(ds); GridView1.datasource = ds; GridView1.Databind();
谢谢
Ashish
hi how to get perticualr user details after log in ?
simply query or stored procedure?
tblTable1
sbidID int sbidDID varchar(20) sbidDocType varchar(4) sbidUserID int
this records from tblTable1
1 88 Nokia 146
tblTableLogin
linLoginID linUserGroupID linUserDetailsID linLoginName linPassword 1 1 1 admin admin 146 1 146 shahid shahid
so after login in i want to display records in grid after login to perticular user ID..using linUsrDetailsID or linLoginID
and i want to get records from tblTable1 to display records in grid using their linUserDetailsID
please help me thank you..
解决方案
这篇关于如何获取特定的用户详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!