Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem with password fields on post back

Reply
Thread Tools

Problem with password fields on post back

 
 
Simon Harvey
Guest
Posts: n/a
 
      05-06-2004
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


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      05-06-2004
use standard textbox with masking?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Simon Harvey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Simon Harvey
Guest
Posts: n/a
 
      05-06-2004
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


 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      05-06-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Simon Harvey
Guest
Posts: n/a
 
      05-07-2004
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


 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      05-07-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Paul Drust
Guest
Posts: n/a
 
      05-07-2004
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" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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

 
Reply With Quote
 
J Sahoo
Guest
Posts: n/a
 
      05-07-2004
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" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 1 01-16-2009 02:56 PM
Changing a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 2 01-16-2009 02:08 PM
How does a dynamic control load post back data across post back?? =?Utf-8?B?Z29yaWxsYQ==?= ASP .Net 1 05-25-2007 05:02 AM
How can I send back(Post back) some values from client machine Joby ASP .Net 0 05-14-2004 04:19 AM
How to keep the password in a password field when page post back? feng ASP .Net 4 02-28-2004 06:46 PM



Advertisments