473,386 Members | 1,827 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,386 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 1416

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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.