locked
Personal User RRS feed

  • Question

  • User-1994446809 posted

    Please I will love to know how to assign an email as an identification for a user on my website, so that the user will have sole power to edit, delete, and update an information anytime. Also, if I happen to offer paid service and the user pays for units; the units will be attached to the user and when the user uses any service the unit will automatically reduce until the user exhausts all units. I will very much appreciate if I can get directions and help in achieving this. Thank you anticipation.

    -George

    Saturday, April 25, 2020 12:08 AM

Answers

  • User409696431 posted

    Using Visual Studio 2015:

    If you created your site using File -> New -> Website, and from the dialog selected  "ASP.NET Web Forms Site", you will have an Account directory with the register, login, etc files already created.  If you open Register.aspx in a browser and register a new user, a localdb database will be set up for you with all the fields to handle user accounts.

    The Register form will accept an email address as the user name.  If you want to constrain it to be an email address, you'll need to write code/validation for that. If you wanted the email address to also be populated in the Email field in the database, and not just in the UserName field, you'd need to do that yourself.

    If you created your site using File -> New -> ASP.NET Web Application (.NET Framework), and in the next dialog selected Web Forms, and left the Authentication selection on the right to "Individual User Accounts" (or clicked Change Authentication to select that if another option shows),  you  will also get an Account folder, and in this case the Registration Form defaults to asking you for an Email instead of a User Name, and populates the email in both the UserName and Email fields in the database.

    You would then need to know how to constrain certain pages to logged in users, and how to check for the username in a given page, and, of course to design your database to map that username to anything else in your database that needed to be associated only with that user.   You can look up that information in WebForms documentation, and I'll assume if you are using a database you know how to design it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 26, 2020 10:26 PM

All replies

  • User409696431 posted

    Which asp.net technology are you using on your website?

    Saturday, April 25, 2020 1:01 AM
  • User-1994446809 posted

    I am using asp.net web form

    Saturday, April 25, 2020 5:58 AM
  • User409696431 posted

    Which version of Visual Studio are you using.  Generally, if you create a Webforms project from the basic template, pages to manage accounts are included.  The details differ depending on what version of VS you are using.

    Sunday, April 26, 2020 4:45 PM
  • User-1994446809 posted
    Visual Studio community 2015
    Sunday, April 26, 2020 9:21 PM
  • User409696431 posted

    Using Visual Studio 2015:

    If you created your site using File -> New -> Website, and from the dialog selected  "ASP.NET Web Forms Site", you will have an Account directory with the register, login, etc files already created.  If you open Register.aspx in a browser and register a new user, a localdb database will be set up for you with all the fields to handle user accounts.

    The Register form will accept an email address as the user name.  If you want to constrain it to be an email address, you'll need to write code/validation for that. If you wanted the email address to also be populated in the Email field in the database, and not just in the UserName field, you'd need to do that yourself.

    If you created your site using File -> New -> ASP.NET Web Application (.NET Framework), and in the next dialog selected Web Forms, and left the Authentication selection on the right to "Individual User Accounts" (or clicked Change Authentication to select that if another option shows),  you  will also get an Account folder, and in this case the Registration Form defaults to asking you for an Email instead of a User Name, and populates the email in both the UserName and Email fields in the database.

    You would then need to know how to constrain certain pages to logged in users, and how to check for the username in a given page, and, of course to design your database to map that username to anything else in your database that needed to be associated only with that user.   You can look up that information in WebForms documentation, and I'll assume if you are using a database you know how to design it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 26, 2020 10:26 PM