473,587 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
txtConfirmPassw ord

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 1379
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**********@t he-web-works.co.uk> wrote in message
news:eb******** *****@TK2MSFTNG P11.phx.gbl...
Hi all,

Can anyone help me with the following:

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

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**********@t he-web-works.co.uk> wrote in message
news:Of******** ******@tk2msftn gp13.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**********@t he-web-works.co.uk> wrote in message
news:Og******** ******@TK2MSFTN GP11.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**********@t he-web-works.co.uk> wrote in message news:<Og******* *******@TK2MSFT NGP11.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**********@t he-web-works.co.uk> wrote in message news:<Og******* *******@TK2MSFT NGP11.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
11867
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 the top of my script I assign a few variables to incoming GET and POST values. $login = clean($_POST, 30); $passwd = clean($_POST, 30);
9
2635
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'; global $LOGINDIR;
4
6059
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 this: private static final int DEFAULT_MINIMUM_LENGTH = ??????
4
4450
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 python 2.3 Here is an exemple of the piece of code I use: import urllib2 #Proxy handler proxy_handler = urllib2.ProxyHandler({"http" :
6
6529
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 works fine, but passing the resulting recordset back to the sub's caller is not working out.
8
2127
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 of the post back, passwords entered by the user lose their values and the user gets an error message upon final validation when they submit. ...
1
2363
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 of the post back, passwords entered by the user lose their values and the user gets an error message upon final validation when they submit. Here's...
2
2095
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 am developing with VS2003 and on Windows 2000 Server and have all of the service packs for .NET and Windows. The application is running on an...
0
2885
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 passed to changePass.asp but after creating the code. I am getting this error ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7974
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.