473,289 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Plz Help : Want to clear Email,Question, Answer TextBoxes in CreateUserWizard control

2
Hello

I am new to ASP.NET. I am using CreateUserWizard control to register & create a user. I am using Membership API. I have a Cancel button on the second step of CreateUserWizard control alongwith Create User button & Previous button. Actually, i have added some more textboxes on the default control for taking user's personal information. The problem is that when i call the below mentioned code all textboxes for user's personal information gets cleared but not the default controls on the CreateUserWizard control which takes user's login ,Email, Security question, answer's information. My code is as follows:

protected void CreateUserWizard2_CancelButtonClick(object sender, EventArgs e)
{//Calling a function & passing all the createuserwizard controls
DisplayControl(CreateUserWizard2.CreateUserStep.Co ntentTemplateContainer.Controls);
fstname.Focus();
}

private void DisplayControl(ControlCollection Controls)
{ //recusive routine that can go through the entire control hierarchy
//making empty all textbox controls except with id=username
foreach (System.Web.UI.Control control in Controls)
{
if (control is System.Web.UI.WebControls.TextBox )
{
if (((System.Web.UI.WebControls.TextBox)control).ID != "UserName")
((System.Web.UI.WebControls.TextBox)control).Text = "";
}
if (control.Controls != null)
{
DisplayControl(control.Controls);
}
}

}
Apr 7 '08 #1
0 1414

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Phil | last post by:
I would like to make the CreateUserWizard's security question box display as a databound (xml file) dropdownlist. I can make the dropdownlist display by using a contenettemplate, but I can't get...
1
by: J.G. | last post by:
I have set up my web application to utilize an ADAM membership provider. Everything is going well, except I do not wish to utilize the built-in PasswordRecovery control (I don't want the randomly...
3
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
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...
0
by: John Hall | last post by:
We are using Visual Web Developer 2005 Express and the ASP.NET administration tool to create users. After we implemented <asp:passwordrecovery ... /> new passwords are emailed to the user instead...
0
by: Smokey Grindle | last post by:
I am using the user creation wizard in asp.net 2.0 and using it to send the user an email message when their account is created, well this works great if the address is a valid mailbox, but when it...
7
by: Jonathan Wood | last post by:
I'm using ASP.NET membership functionality. My problem is that I think I'd rather have each user account keyed on an email instead of a user name. My main problem with user names is that...
3
by: Vincent | last post by:
Hi, With this CreateuserWizard code, i have two problems: 1) when email is left empty ="email not valid." and not "E-mailadres is required." (never shown). When is "E-mailadres is required."...
4
by: gurufordy | last post by:
Hello. Trying to use the ASP.net user functionality but it keeps failing on me. I have created a login and registration page for my site. When you fill in the registration form it should send a...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.