简体   繁体   English

如何向 ASP.NET 上的帐户添加不同的属性?

[英]How can I add different attributes to the account on ASP.NET?

So I am following this tutorial: https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/#create-an-aspnet-mvc-5-application所以我正在关注本教程: https : //azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/#create- an-aspnet-mvc-5-application

and I was wondering how do I go about adding more things to the account?我想知道如何向帐户添加更多内容? Like when I register it asks for email and password, but how would I add a name field (with database storage of course) ?就像我注册时要求输入电子邮件和密码一样,但是我将如何添加名称字段(当然还有数据库存储)?

You can use the Profile Variables.您可以使用配置文件变量。

From MSDN来自 MSDN

In many applications, you want to store and use information that is unique to a user.在许多应用程序中,您希望存储和使用用户独有的信息 When a user visits your site, you can use the information you have stored to present the user with a personalized version of your Web application.当用户访问您的站点时,您可以使用您存储的信息向用户展示您的 Web 应用程序的个性化版本。 Personalizing an application requires a number of elements: you must store the information using a unique user identifier, be able to recognize users when they visit again, and then fetch the user information as needed.个性化应用程序需要许多元素:您必须使用唯一的用户标识符存储信息,能够在用户再次访问时识别用户,然后根据需要获取用户信息。 To simplify your applications, you can use the ASP.NET profile feature , which can perform all of these tasks for you.为了简化您的应用程序,您可以使用 ASP.NET 配置文件功能,它可以为您执行所有这些任务。

Introduction to Membership会员介绍

ASP.NET Profile Properties Overview ASP.NET 配置文件属性概述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM