473,396 Members | 1,923 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,396 software developers and data experts.

Problem with password fields on post back

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
7 1367
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dan | last post by:
I was trying to troubleshoot a login page that doesn't work - it keeps saying the login/password is missing - when my tracing discovered this peculiar behavior. register_globals is off, so at...
9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
4
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like...
4
by: bmiras | last post by:
I've got a problem using urllib2 to get a web page. I'm going through a proxy using user/password authentification and i'm trying to get a page asking for a HTTP authentification. And I'm using...
6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
8
by: dwa | last post by:
All, We're trying to determine how to deal with password fields losing their state on a post back. We've got a form that implements post backs to carry out server side processing. As a...
1
by: dwa | last post by:
All, We're trying to determine how to deal with password fields losing their state on a post back. We've got a form that implements post backs to carry out server side processing. As a result...
2
by: Wysiwyg | last post by:
I'm going back to a previous asp.net (C#) web project after a few months of inactivity and my first form, the login, won't submit. I ran with the debugger and still can't see how to resolve this. I...
0
by: Vash10 | last post by:
I have two asp files. Login.asp and changePass.asp. what i want to do is to make the user change his password after his first login. so what happens is login.asp is the first to be used then it is...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.