By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,244 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,244 IT Pros & Developers. It's quick & easy.

losing content of password TextBox control inside of a TemplatedWizardStep

P: n/a
Folks I am losing my mind trying to work with the
TemplatedWizardStep. I have created a multistep user registration
form that collects plenty of user information including a password.
At the end of the process I am finding that the value of my password
control is blank. When I set the textmode of my textbox to
singleline, the value is preserved. It is just when the textbox is
set to password that I lose the value.
I am casting to the password box in the following way:

// make reference to the password step
TemplatedWizardStep passwordStep = SelectPasswordStep;

// password step
TextBox PasswordChoice =

(TextBox)passwordStep.ContentTemplateContainer.Fin dControl("Password");

Response.Write(PasswordChoice.Text);

This is the same way that I cast to the other controls and I have no
issues. I understand that I can't reset the value of the password
textbox, but that isn't what I'm trying to do. I just need to be able
to read it at the end of my process to create the user's account.

I have been at this for most of the week now. Is it just not possible
to keep the value of a password textbox inside of a
templatedwizardstep? I can't be the first person to use these
controls for the purpose of creating a user account..

Any help would be appreciated.

Thanks,
JQ

May 11 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I think it relates to that, that in password mode, TextBox doesn't restore
the value from posted data. That is, if you have more than one postback
between setting the password and reading it, it contains nothing. You need
to read the pwd on the next postback (or store it immediately to session or
something on the subsequent postback)

But note that password TextBox's value can be set or you can create custom
pwd control to hold the value over multiple postbacks:
http://aspadvice.com/blogs/joteke/ar...Box_3F00_.aspx

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"jqheller" <jh*****@gmail.comwrote in message
news:11*********************@e51g2000hsg.googlegro ups.com...
Folks I am losing my mind trying to work with the
TemplatedWizardStep. I have created a multistep user registration
form that collects plenty of user information including a password.
At the end of the process I am finding that the value of my password
control is blank. When I set the textmode of my textbox to
singleline, the value is preserved. It is just when the textbox is
set to password that I lose the value.
I am casting to the password box in the following way:

// make reference to the password step
TemplatedWizardStep passwordStep = SelectPasswordStep;

// password step
TextBox PasswordChoice =

(TextBox)passwordStep.ContentTemplateContainer.Fin dControl("Password");

Response.Write(PasswordChoice.Text);

This is the same way that I cast to the other controls and I have no
issues. I understand that I can't reset the value of the password
textbox, but that isn't what I'm trying to do. I just need to be able
to read it at the end of my process to create the user's account.

I have been at this for most of the week now. Is it just not possible
to keep the value of a password textbox inside of a
templatedwizardstep? I can't be the first person to use these
controls for the purpose of creating a user account..

Any help would be appreciated.

Thanks,
JQ
May 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.