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

Problem with password fields on post back

P: n/a
Hi all,

Can anyone help me with the following:

I have a page that has a couple of password fields - txtPassword and
txtConfirmPassword

I also have a need on this page to do postbacks and then reload the page.
The problem is that when the page reloads, the password fields are empty.
They havent been reinitialised using the viewstate.

I realise this is a useful security precaution, but is there anyway I can
either turn this functionality off or circumvent it as it isnt appropriate
on this particular page?

Thanks all

Simon
Nov 18 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
use standard textbox with masking?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Simon Harvey" <si**********@the-web-works.co.uk> wrote in message
news:eb*************@TK2MSFTNGP11.phx.gbl...
Hi all,

Can anyone help me with the following:

I have a page that has a couple of password fields - txtPassword and
txtConfirmPassword

I also have a need on this page to do postbacks and then reload the page.
The problem is that when the page reloads, the password fields are empty.
They havent been reinitialised using the viewstate.

I realise this is a useful security precaution, but is there anyway I can
either turn this functionality off or circumvent it as it isnt appropriate
on this particular page?

Thanks all

Simon

Nov 18 '05 #2

P: n/a
Thats an interesting idea Curt.

I didnt think that the standard textbox had support for masking.

Does it just work that you can get the text out of the text box as normal,
but the text is obscured somehow?

Thanks for your help!

Simon
Nov 18 '05 #3

P: n/a
use two textboxes perhaps? This would be a lot of clientside but have the
keystroke write the current value to a hidden textbox and replace the
visible one with ***.
Never tried this but it may work.

How about explaining WHY you need to have it postback AND keep the password
visible. Maybe there is a better way to accomplish what you are after.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Simon Harvey" <si**********@the-web-works.co.uk> wrote in message
news:Of**************@tk2msftngp13.phx.gbl...
Thats an interesting idea Curt.

I didnt think that the standard textbox had support for masking.

Does it just work that you can get the text out of the text box as normal,
but the text is obscured somehow?

Thanks for your help!

Simon

Nov 18 '05 #4

P: n/a
The reason why I have to do this is that I have a form that allows the
system admin of a website to create a new user for the site.

He needs to put in various details including an initial password for the
user. The user changes this at first login.

Also on the page are two list boxes, the first containing all available
roles, and the other containing any roles that you want to assign to the new
user. When you click to add a role to the user, the postback occurs.

Any thoughts would be great. Thanks for your help

Simon
Nov 18 '05 #5

P: n/a
after he postsback if the pass is saved why display it again? If there is a
problem saving it's pretty common to have to reenter the pass, just leave it
at that.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Simon Harvey" <si**********@the-web-works.co.uk> wrote in message
news:Og**************@TK2MSFTNGP11.phx.gbl...
The reason why I have to do this is that I have a form that allows the
system admin of a website to create a new user for the site.

He needs to put in various details including an initial password for the
user. The user changes this at first login.

Also on the page are two list boxes, the first containing all available
roles, and the other containing any roles that you want to assign to the new user. When you click to add a role to the user, the postback occurs.

Any thoughts would be great. Thanks for your help

Simon

Nov 18 '05 #6

P: n/a
Simon,

You may not want to put your passwords into a hidden text field simply
because it is in plain text if someone does "View Source" on the page
(perhaps not an issue).

Might I suggest a few other possibilities:
(1) Rearchitect the "roles" handling so it doesn't require a postback
(don't know what you code is doing, so I can't tell if this is
feasible).
(2) Make the password change and the "roles" handling separate
processes on two different pages.
(3) Make the user save the password changes before performing the
"roles" processing. After the postback, the password fields would be
blank, but they would already be saved. Not the nicest UI
implementation, but there it is.

Good luck.

-- Paul

"Simon Harvey" <si**********@the-web-works.co.uk> wrote in message news:<Og**************@TK2MSFTNGP11.phx.gbl>...
The reason why I have to do this is that I have a form that allows the
system admin of a website to create a new user for the site.

He needs to put in various details including an initial password for the
user. The user changes this at first login.

Also on the page are two list boxes, the first containing all available
roles, and the other containing any roles that you want to assign to the new
user. When you click to add a role to the user, the postback occurs.

Any thoughts would be great. Thanks for your help

Simon

Nov 18 '05 #7

P: n/a
I have the same problem but so far I have not got any real solution as
how to handle it. If anybody can provide some sample code, it will be
a great help. May be somebody from Microsoft should provide some help.

Thank you.

Sahoo J
"Simon Harvey" <si**********@the-web-works.co.uk> wrote in message news:<Og**************@TK2MSFTNGP11.phx.gbl>...
The reason why I have to do this is that I have a form that allows the
system admin of a website to create a new user for the site.

He needs to put in various details including an initial password for the
user. The user changes this at first login.

Also on the page are two list boxes, the first containing all available
roles, and the other containing any roles that you want to assign to the new
user. When you click to add a role to the user, the postback occurs.

Any thoughts would be great. Thanks for your help

Simon

Nov 18 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.