473,503 Members | 1,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with CreateUserWizard

Guy
I'm using a CreateUserWizard with an extra WizardStep. My code is based on
this http://msdn2.microsoft.com/en-us/library/ms178342.aspx code.
When the method "protected void CreateUserWizard1_CreatedUser(...)" executes,
using the debugger I can see all entered values (CreateUserWizard1.Password,
CreateUserWizard1.Email EXCEPT CreateUserWizard1.UserName is "",
however this UserName was of course entered. I don't know what happens. Find
hereafter the code snippet for this method:

protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
// Determine the checkbox values.
CheckBox subscribeCheckBox =
(CheckBox)CreateUserWizard1.CreateUserStep.Content TemplateContainer.FindControl("SubscribeCheckBox") ;
CheckBox shareInfoCheckBox =
(CheckBox)CreateUserWizard1.CreateUserStep.Content TemplateContainer.FindControl("ShareInfoCheckBox") ;

// The following line doesn't give the entered UserName value,
// however this was correct entered!
MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName);

user.Comment = "Subscribe=" + subscribeCheckBox.Checked.ToString() +
"&" +
"ShareInfo=" + shareInfoCheckBox.Checked.ToString();
Membership.UpdateUser(user);

// Show or hide the labels based on the checkbox values.
Label subscribeLabel =

(Label)CreateUserWizard1.CompleteStep.ContentTempl ateContainer.FindControl("SubscribeLabel");
Label shareInfoLabel =

(Label)CreateUserWizard1.CompleteStep.ContentTempl ateContainer.FindControl("ShareInfoLabel");

subscribeLabel.Visible = subscribeCheckBox.Checked;
shareInfoLabel.Visible = shareInfoCheckBox.Checked;
}

Anyone suggestions what goes wrong here, i'm completely lost on this.

Thanks
Mar 9 '06 #1
0 871

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5219
by: Raventhorn | last post by:
I am trying, as I can see many are, to avoid the CreateUserWizard's CreateUser step from creating the user until I am ready to do it. I have a rather complex registration because I have various...
2
3535
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
3
1966
by: Ben R. | last post by:
Seems like CreateUserWizard flat out ignores StartNavigationTemplate. Not sure why the designer bothers to offer for you to edit it, but even when you specifiy this, it doesn't seem to be used. Is...
2
2243
by: Learner | last post by:
Hello, I have defined another textbox control in the CreateUserWizard control and this is how I am trying to get the value of it in the code behind page is below im myStep As...
2
4317
by: guoqi zheng | last post by:
Dear sir, I am using the createUserWizard of ASP.NET 2.0. I am trying to add two extra fields to it. FirstName and LastName. However I did not find out how can get the value out of this two...
0
1608
by: Nehpets | last post by:
I'm trying to setup a web site that uses active directory for user authentication under asp.net 2.0. For testing, I have separately installed two virtual servers. The first is a domain...
1
2788
by: Pedro Mir | last post by:
Hi! I am only asking for username, mail, password and security question in my CreateUserWizard control with the LoginCreatedUser=false. I am doing this because I amd sending an email for email...
0
2006
by: Avi | last post by:
A CreateUserWizard contorl receives new user details, adds the user to the database, tries to send a confirmation mail message and stops with a "System.FormatException: The specified string is not...
1
2197
by: staeri | last post by:
Hello! It looks like the newly registered user is logged in after the CompleteWizardStep in CreateUserWizard is finished. I would like to logout the user when that step appears. How can I do...
3
2577
by: Ken Fine | last post by:
I am using ASP.NET's CreateUserWizard control. I want to force the visitor to use a username and e-mail address that I am providing in programming, and I do not want the visitor to be able to edit...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.