422,946 Members | 1,099 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,946 IT Pros & Developers. It's quick & easy.

Losing data in a textbox on postback

P: n/a
et
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields that
cause a postback, even though they are not done saving the record.. How can
I retain what the user has entered in the password field even on postback?
And why does it only happen to the password field; all other fields are
retained.
Dec 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Chk for enableviewstate property true ?
- Kailas

Dec 22 '05 #2

P: n/a
Chk for enableviewstate property = true for the password textbox?
- Kailas

Dec 22 '05 #3

P: n/a
Yes, it's enabled. Still lose it.
<ka******************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Chk for enableviewstate property = true for the password textbox?
- Kailas

Dec 22 '05 #4

P: n/a
You can not, PW is different.

Use the form posted data stuff.
"et" <ea*************@yahoo.com> schreef in bericht
news:%2****************@TK2MSFTNGP12.phx.gbl...
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields
that cause a postback, even though they are not done saving the record..
How can I retain what the user has entered in the password field even on
postback? And why does it only happen to the password field; all other
fields are retained.

Dec 23 '05 #5

P: n/a
For security reasons, a password is not normally retained with a postback
because anyone will be able to see the password from the HTML source. Your
best option is to create a ViewState variable of your own and assign the
password to it on postback in most likely the Page_Load method. Then, in
the Page_PreRender method, reassign the password back to that particular
textbox.

Your truly best option is to collect all of the information first before you
have to postback. That way, you can process the password and forget about
it.

Hope this helps!
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"et" <ea*************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields
that cause a postback, even though they are not done saving the record..
How can I retain what the user has entered in the password field even on
postback? And why does it only happen to the password field; all other
fields are retained.

Dec 23 '05 #6

P: n/a
dew
I agree, that's probably the best idea, fill out everything else, then enter
the password. Thanks everyone!

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
For security reasons, a password is not normally retained with a postback
because anyone will be able to see the password from the HTML source.
Your best option is to create a ViewState variable of your own and assign
the password to it on postback in most likely the Page_Load method. Then,
in the Page_PreRender method, reassign the password back to that
particular textbox.

Your truly best option is to collect all of the information first before
you have to postback. That way, you can process the password and forget
about it.

Hope this helps!
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"et" <ea*************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields
that cause a postback, even though they are not done saving the record..
How can I retain what the user has entered in the password field even on
postback? And why does it only happen to the password field; all other
fields are retained.


Jan 4 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.