1
我是新來的會員。我有一個名爲contact的表,其中包含一個必須從成員用戶表中獲取其數據的字段userId。所以當創建用戶時,我必須從成員用戶表中獲取userId。我怎樣才能做到這一點? thanx提前如何從會員用戶表中檢索userId
我是新來的會員。我有一個名爲contact的表,其中包含一個必須從成員用戶表中獲取其數據的字段userId。所以當創建用戶時,我必須從成員用戶表中獲取userId。我怎樣才能做到這一點? thanx提前如何從會員用戶表中檢索userId
使用MembershipUser對象的ProviderUserKey屬性:
http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.provideruserkey.aspx
所以說:
MembershipUser user = Membership.CreateUser("foo","password");
user.ProviderUserKey
thanx Luis。有效 – sarah 2010-06-07 06:16:35
你談論[ASP.NET成員資格提供(HTTP: //msdn.microsoft.com/en-us/library/yh26yfzy.aspx)或其他東西? – R0MANARMY 2010-06-06 12:55:09