Last post Apr 26, 2020 10:26 PM by KathyW
Apr 25, 2020 12:08 AM|georgeakpan233|LINK
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.
Apr 25, 2020 01:01 AM|KathyW|LINK
Which asp.net technology are you using on your website?
Apr 25, 2020 05:58 AM|georgeakpan233|LINK
I am using asp.net web form
Apr 26, 2020 04:45 PM|KathyW|LINK
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.
Apr 26, 2020 09:21 PM|georgeakpan233|LINK
Apr 26, 2020 10:26 PM|KathyW|LINK
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.