473,487 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Password Field

Have a textbox that's in Password mode on a user creation page. Have
several dropdowns that cause a PostBack out of necessity on this page. I
cannot separate them. When one of these dropdowns changes, the textbox's
value is lost. How do I prevent this?

Thanks
Jan 5 '06 #1
6 2341
the best way would be to remember it from the original postback, so it only
passes over the network once. otherwise you can use a hack, and set the
control's "value" attribute.

-- bruce (sqlwork.com)

"James" <mi*******@gmail.com> wrote in message
news:OD*************@TK2MSFTNGP15.phx.gbl...
Have a textbox that's in Password mode on a user creation page. Have
several dropdowns that cause a PostBack out of necessity on this page. I
cannot separate them. When one of these dropdowns changes, the textbox's
value is lost. How do I prevent this?

Thanks

Jan 5 '06 #2
Can I? I've tried setting it in my Page Load event and it doesn't seem to
persist. I've also tried using a client side control with runat=server.
None of the above seem to want to let me set the value.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
the best way would be to remember it from the original postback, so it
only passes over the network once. otherwise you can use a hack, and set
the control's "value" attribute.

-- bruce (sqlwork.com)

"James" <mi*******@gmail.com> wrote in message
news:OD*************@TK2MSFTNGP15.phx.gbl...
Have a textbox that's in Password mode on a user creation page. Have
several dropdowns that cause a PostBack out of necessity on this page. I
cannot separate them. When one of these dropdowns changes, the textbox's
value is lost. How do I prevent this?

Thanks


Jan 5 '06 #3
You have to do it on the client side using javascript.

Losing the value of a password field is pretty standard. If the password
field is the last one on your page, it should in theory be the last field a
user fills in, so it geting emptied shouldn't really happen.

"James" <mi*******@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can I? I've tried setting it in my Page Load event and it doesn't seem to
persist. I've also tried using a client side control with runat=server.
None of the above seem to want to let me set the value.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
the best way would be to remember it from the original postback, so it
only passes over the network once. otherwise you can use a hack, and set
the control's "value" attribute.

-- bruce (sqlwork.com)

"James" <mi*******@gmail.com> wrote in message
news:OD*************@TK2MSFTNGP15.phx.gbl...
Have a textbox that's in Password mode on a user creation page. Have
several dropdowns that cause a PostBack out of necessity on this page.
I cannot separate them. When one of these dropdowns changes, the
textbox's value is lost. How do I prevent this?

Thanks



Jan 5 '06 #4
JavaScript doesn't seem to work either. It isn't the last field they will
enter, and even if it were, there's no way they'd go for that =/.

"Marina" <so*****@nospam.com> wrote in message
news:OT*************@TK2MSFTNGP09.phx.gbl...
You have to do it on the client side using javascript.

Losing the value of a password field is pretty standard. If the password
field is the last one on your page, it should in theory be the last field
a user fills in, so it geting emptied shouldn't really happen.

"James" <mi*******@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can I? I've tried setting it in my Page Load event and it doesn't seem
to persist. I've also tried using a client side control with
runat=server. None of the above seem to want to let me set the value.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
the best way would be to remember it from the original postback, so it
only passes over the network once. otherwise you can use a hack, and set
the control's "value" attribute.

-- bruce (sqlwork.com)

"James" <mi*******@gmail.com> wrote in message
news:OD*************@TK2MSFTNGP15.phx.gbl...
Have a textbox that's in Password mode on a user creation page. Have
several dropdowns that cause a PostBack out of necessity on this page.
I cannot separate them. When one of these dropdowns changes, the
textbox's value is lost. How do I prevent this?

Thanks



Jan 5 '06 #5
I know for a fact that if you set the value on an input control that is a
password type in javascript, that it does get set correctly. Maybe you need
to post your code then.

I bet your users will like the fact that their password is being sent in
clear text in the browser even less then having to retype their password,
since that is the only way to preserve it in between posts. I would
recommend either accepting that passwords will be blank between posts (this
happens pretty much in every other registration system), re-organize your
registration in such a way that the password gets its own page and it is the
last page in the registration process, or code using the javascript solution
and have the password be sent in clear text - which should be the last
resort.

"James" <mi*******@gmail.com> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
JavaScript doesn't seem to work either. It isn't the last field they will
enter, and even if it were, there's no way they'd go for that =/.

"Marina" <so*****@nospam.com> wrote in message
news:OT*************@TK2MSFTNGP09.phx.gbl...
You have to do it on the client side using javascript.

Losing the value of a password field is pretty standard. If the password
field is the last one on your page, it should in theory be the last field
a user fills in, so it geting emptied shouldn't really happen.

"James" <mi*******@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can I? I've tried setting it in my Page Load event and it doesn't seem
to persist. I've also tried using a client side control with
runat=server. None of the above seem to want to let me set the value.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
the best way would be to remember it from the original postback, so it
only passes over the network once. otherwise you can use a hack, and
set the control's "value" attribute.

-- bruce (sqlwork.com)

"James" <mi*******@gmail.com> wrote in message
news:OD*************@TK2MSFTNGP15.phx.gbl...
> Have a textbox that's in Password mode on a user creation page. Have
> several dropdowns that cause a PostBack out of necessity on this page.
> I cannot separate them. When one of these dropdowns changes, the
> textbox's value is lost. How do I prevent this?
>
> Thanks
>



Jan 5 '06 #6
Thanks for the help, this seems to work on Postback:

tbPassword.Attributes("value") = tbPassword.Text

"Marina" <so*****@nospam.com> wrote in message
news:eK*************@TK2MSFTNGP15.phx.gbl...
I know for a fact that if you set the value on an input control that is a
password type in javascript, that it does get set correctly. Maybe you
need to post your code then.

I bet your users will like the fact that their password is being sent in
clear text in the browser even less then having to retype their password,
since that is the only way to preserve it in between posts. I would
recommend either accepting that passwords will be blank between posts
(this happens pretty much in every other registration system), re-organize
your registration in such a way that the password gets its own page and it
is the last page in the registration process, or code using the javascript
solution and have the password be sent in clear text - which should be the
last resort.

"James" <mi*******@gmail.com> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
JavaScript doesn't seem to work either. It isn't the last field they
will enter, and even if it were, there's no way they'd go for that =/.

"Marina" <so*****@nospam.com> wrote in message
news:OT*************@TK2MSFTNGP09.phx.gbl...
You have to do it on the client side using javascript.

Losing the value of a password field is pretty standard. If the
password field is the last one on your page, it should in theory be the
last field a user fills in, so it geting emptied shouldn't really
happen.

"James" <mi*******@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can I? I've tried setting it in my Page Load event and it doesn't seem
to persist. I've also tried using a client side control with
runat=server. None of the above seem to want to let me set the value.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
> the best way would be to remember it from the original postback, so it
> only passes over the network once. otherwise you can use a hack, and
> set the control's "value" attribute.
>
> -- bruce (sqlwork.com)
>
>
>
> "James" <mi*******@gmail.com> wrote in message
> news:OD*************@TK2MSFTNGP15.phx.gbl...
>> Have a textbox that's in Password mode on a user creation page. Have
>> several dropdowns that cause a PostBack out of necessity on this
>> page. I cannot separate them. When one of these dropdowns changes,
>> the textbox's value is lost. How do I prevent this?
>>
>> Thanks
>>
>
>



Jan 5 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3685
by: John Victor | last post by:
In my mysql database, I've stored all the passwords using the PASSWORD() function. Now I'm running a test and need to compare the password in my php document to that saved in the database. I used...
2
1582
by: Phil Latio | last post by:
I am trying something very simple, to pass the contents of a form (just username and password) to execute a query on MySQL table. The problem appears to be the password field. For example,...
7
8675
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
4
4540
by: feng | last post by:
For a HTTP textbox with a Type of "password", the default behaiver is that the field will be cleared out when the page is posted back. This make sense in most of the cases. But in some situation,...
4
8255
by: J Sahoo | last post by:
Hello, I have a registration page where I am collecting user information (username, password, last name, age, etc...). I made the password field as PASSWORD (field type from the textbox). If user...
10
11726
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I have a webform which contains 2 dropdowns and a textbox with type="password". On "SelectedIndexChanged" event of the first dropdown, there is...
5
8137
by: Vincent van Beveren | last post by:
Hi everyone, I have a page with a login box. Because of lack of space, instead of labels I put the descriptive text in the input fields (so username input says 'username', and password input...
1
2600
by: dan.cawthorne | last post by:
Hi all, Need Some Help With A Simple Password Form What a I Have Is Single Field Table, With One Record In It The Field is Called table is also called "Password" which ive created a form...
2
11090
by: newkhan | last post by:
Hi Experts, I am currently using c#.net to complete my project and my problem is that for authentication i have used a form containing login and password fields but there is a...
0
7106
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
6967
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
7181
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...
1
6846
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
5442
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,...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
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 ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.