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

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 2337
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
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
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
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
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
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
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
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
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
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.