如何向默认 SQL 配置文件和成员资格提供程序中的现有用户添加配置文件条目(由 guid、两个字符串和一个整数组成)?我可以通过 sql 查询或 C# 代码执行此操作。
我需要将这些配置文件添加到现有用户中。
最佳答案
您可以使用各种方法 ProfileBase :
var profile = ProfileBase.Create(username);
profile.SetPropertyValue("MyGuid", aGuid);
profile.SetPropertyValue("MyString", aString);
// etc
profile.Save()
关于c# - ASP.NET 配置文件 - 向现有用户添加配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1283008/