ASP.NET中的数据库 [英] Databases in a ASP.NET
本文介绍了ASP.NET中的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经添加了由Visual Studio创建的普通asp.net数据库的用户登录名(创建用户向导控件).
一旦向导创建了用户,并且找不到解决方案,我需要将用户的ID保存在单独的数据库中.....
有任何答案吗??
谢谢!
解决方案
标准成员资格提供程序希望仅将内容保留在标准数据库中-如果要将ID复制到单独的数据库中,则有两个选择:
1)将代码添加到向导使用的创建用户"页面.
2)提供一个自定义成员资格提供程序 [CreatedUser [ 解决方案
The standard Membership provider expects to only keep things in the standard database - if you want to copy the id into a separate database then you have two choices:
1) Add code to the Create User page that the wizard uses.
2) Provide a custom Membership provider[^] and do all the database stuff yourself.
Personally, I would go for the second option, as maintaining two separate databases with the same info in synch is more trouble than it is worth.
Handle the CreatedUser[^] event and insert the necessary information into your database.
这篇关于ASP.NET中的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文