Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何编辑用户';s配置文件变量(来自web.config),同时指定用户?_C#_Asp.net_Visual Studio - Fatal编程技术网

C# 如何编辑用户';s配置文件变量(来自web.config),同时指定用户?

C# 如何编辑用户';s配置文件变量(来自web.config),同时指定用户?,c#,asp.net,visual-studio,C#,Asp.net,Visual Studio,这是我为当前登录的用户编辑配置文件变量的方式: Profile.variablename=“this” 我如何做同样的事情,但是指定我想要更改其配置文件变量的用户名,而不仅仅是当前登录的用户 类似于Profile.variablename.(“username”,“this”)的东西就是我要找的 我正在使用C#asp.net,感谢您的帮助。您可以使用profile.GetProfile()方法检索特定的配置文件: ProfileCommon profile = Profile.GetProfil

这是我为当前登录的用户编辑配置文件变量的方式:
Profile.variablename=“this”

我如何做同样的事情,但是指定我想要更改其配置文件变量的用户名,而不仅仅是当前登录的用户

类似于
Profile.variablename.(“username”,“this”)
的东西就是我要找的


我正在使用C#asp.net,感谢您的帮助。

您可以使用
profile.GetProfile()
方法检索特定的配置文件:

ProfileCommon profile = Profile.GetProfile(username);
profile.variablename = "this";

您可以使用
profile.GetProfile()
方法检索特定的概要文件:

ProfileCommon profile = Profile.GetProfile(username);
profile.variablename = "this";