This project is read-only.

Best way to add 'Register'?

Topics: Developer Forum
Nov 30, 2007 at 8:10 AM
I want to be able to allow users to register a new account and I was a little suprised that it wasn't included in the build. Can anyone recommend the best way to add this to the functionality of this kit?

Thanks!
Dec 1, 2007 at 9:29 PM
I use Visual Studio 2008.

Open the site in VS, right click the EasyControls folder and select add 'new item'. In the add new item window select 'Web User Control' at the top right. Change the name to one suitable for the control your creating keeping the .ascx extension. Select the language (C# or VB I use C#) also checkmark the box for placing code on a seperate page then click Add. You should now have a new easy control. All you need to do is drop the CreateUserWizard from the toolbox Login section onto the page. Launch the site, logon as admin, navigate to the page you want to place the control on, select easy control to add. When the easy crontrol is on the page click 'Edit Mode', in the choose control dropdown select the easy control you created then click Save and click View Mode.

You should now have a 'create user' control on your page. You can do the same for all the user functions under login such as the change password and password recovery tools.

Hope that helps.
Dec 28, 2007 at 8:20 AM
First: wow, great starter kit!
Ok, now I have a 'create user' control in a page and an anonymous user can register himself, but how can I had him/her to the 'Users' role as soon as the registration finishes?
tks
sr
Dec 28, 2007 at 2:23 PM
Oops, found it by myself, I'm just a newbye in Asp.net.
bye
May 15, 2008 at 11:23 PM


siroman wrote:
Oops, found it by myself, I'm just a newbye in Asp.net.
bye



Hi, i was looking to this topic because i was trying to do the same but, the las solution you found i want it too. Jeje, i am noob with these tools so if you can help me telling me how did you do that...
thx!
May 16, 2008 at 10:03 AM
It's very simple.
Supposing you followed the steps indicated by dbeaird, adding in a new Web User Control a CreateUserWizard, in the code-behind you may add a CreateUserWizard.Createduser event handler, in wich you simply add the single statement:
       Roles.Provider.AddUsersToRoles(New String() {CreateUserWizard1.UserName}, New String() {"Users"})
and the just registered user will be added to "Users" role


fcu423 wrote:


siroman wrote:
Oops, found it by myself, I'm just a newbye in Asp.net.
bye



Hi, i was looking to this topic because i was trying to do the same but, the las solution you found i want it too. Jeje, i am noob with these tools so if you can help me telling me how did you do that...
thx!


Jun 5, 2008 at 7:59 AM
ok, i am really lost.
I started now by following the steps of dbeaird but i can't. I add the Web User Control but i don't get the part that says: "drop the CreateUserWizard from the toolbox Login section onto the page". What should i do there??? i don't know what CreateUserWizard is he talking abour or what toolbox... O.o
I am really lost and i wish you could understand me because i am learning so... newbie style.

THX

siroman wrote:
It's very simple.
Supposing you followed the steps indicated by dbeaird, adding in a new Web User Control a CreateUserWizard, in the code-behind you may add a CreateUserWizard.Createduser event handler, in wich you simply add the single statement:
       Roles.Provider.AddUsersToRoles(New String() {CreateUserWizard1.UserName}, New String() {"Users"})
and the just registered user will be added to "Users" role


fcu423 wrote:


siroman wrote:
Oops, found it by myself, I'm just a newbye in Asp.net.
bye



Hi, i was looking to this topic because i was trying to do the same but, the las solution you found i want it too. Jeje, i am noob with these tools so if you can help me telling me how did you do that...
thx!





Nov 7, 2008 at 7:44 PM
to fcu423 - listen, visual studio has a very convenient toolbox from which you can drag and drop web-controls to your project.
first of all - switch to 'design view' (preff shift+F7).
now hit Ctrl+Alt+X to show the toolbox.
under the section "login" you will find all of the related controls. drag them upon your blank .ascx view.

this is all the hard work.
Aug 31, 2010 at 6:46 AM

Listen, If you just open a Visual Studio Web Express in 2008 or 2010, there are tools there to help you...if you have download the file mypersonalwebpage open it in visual studio web, then look at the right side of the window you'll see the folder of mypersonalwebpage. Click open the Documentation folder, and click on en "english" you'll see quick_guide.html open it and read the info. that should get you where you need to be..

Aug 31, 2010 at 7:24 AM
WizardMagic wrote:

Listen, If you just open a Visual Studio Web Express in 2008 or 2010, there are tools there to help you...if you have download the file mypersonalwebpage open it in visual studio web, then look at the right side of the window you'll see the folder of mypersonalwebpage. Click open the Documentation folder, and click on en "english" you'll see quick_guide.html open it and read the info. that should get you where you need to be..

Why are you responding to a posting where the last response was 2years old?

You response is in regard to documentation that was added long after this posting.

ALSO NOTE!

User Self Registration, Role Management etc have all been implemented.

Regards

Sep 4, 2010 at 4:15 AM
I know it 2 yrs old...I put it there for other to read in the future...Maybe if you just make it easy for other to understand.. It was hiding the info to where they need to start, also some have no ideal what their doing....

Sent: Tuesday, August 31, 2010 1:24 AM
Subject: Re: Best way to add 'Register'? [MyWebPagesStarterKit:18513]

From: SpiderMaster

WizardMagic wrote:

Listen, If you just open a Visual Studio Web Express in 2008 or 2010, there are tools there to help you...if you have download the file mypersonalwebpage open it in visual studio web, then look at the right side of the window you'll see the folder of mypersonalwebpage. Click open the Documentation folder, and click on en "english" you'll see quick_guide.html open it and read the info. that should get you where you need to be..

Why are you responding to a posting where the last response was 2years old?

You response is in regard to documentation that was added long after this posting.

ALSO NOTE!

User Self Registration, Role Management etc have all been implemented.

Regards