Home All Groups Group Topic Archive Search About
Author
6 Jun 2005 9:22 PM
mkiger
Hey Guys,
Here is my problem:
1. I have a site with a page that allows users to create trial accounts.
2. I have 2 textbox controls set to 'password' for trial users to type and
then retype thier passwords.
3. I have a check box for "i have read the agreement and...." etc.
4. When the checkbox is checked, a 'create account' button is enabled; this,
of course, causes a postback.
5. After the postback, all of the textboxes keep thier values except for the
2 password fields.
I would like the 2 password fields to keep thier value. Has anyone found a
way around this?

Author
6 Jun 2005 9:55 PM
Visar Gashi, MCP
When you use a TextBox in Password mode, it disables its ViewState. You could
create your own PasswordBox control that inherits from the TextBox control
and override the OnRender method to show this information.

Not knowing what your application is, I must say that I wouldn't recommend
doing so. While retyping passwords is annoying at times, it is a better
solution than sending the passwords round-trip multiple times.

Alternatively, why don't you allow inputting the password after you make
sure everything is ok on the page?

Regards,
-Visar

Show quoteHide quote
"mkiger" wrote:

> Hey Guys,
> Here is my problem:
> 1. I have a site with a page that allows users to create trial accounts.
> 2. I have 2 textbox controls set to 'password' for trial users to type and
> then retype thier passwords.
> 3. I have a check box for "i have read the agreement and...." etc.
> 4. When the checkbox is checked, a 'create account' button is enabled; this,
> of course, causes a postback.
> 5. After the postback, all of the textboxes keep thier values except for the
> 2 password fields.
> I would like the 2 password fields to keep thier value. Has anyone found a
> way around this?
Author
10 Jun 2005 12:07 PM
Teemu Keiski
Hi,

http://blogs.aspadvice.com/joteke/archive/2005/02/03/2531.aspx

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


Show quoteHide quote
"mkiger" <mki***@discussions.microsoft.com> wrote in message
news:6732FC29-6858-476A-B413-E2AC9F8D72E3@microsoft.com...
> Hey Guys,
> Here is my problem:
> 1. I have a site with a page that allows users to create trial accounts.
> 2. I have 2 textbox controls set to 'password' for trial users to type and
> then retype thier passwords.
> 3. I have a check box for "i have read the agreement and...." etc.
> 4. When the checkbox is checked, a 'create account' button is enabled;
> this,
> of course, causes a postback.
> 5. After the postback, all of the textboxes keep thier values except for
> the
> 2 password fields.
> I would like the 2 password fields to keep thier value. Has anyone found a
> way around this?