By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 3,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Password TextBox VeiwState Text

P: n/a
Why Password Textbox do not Save VeiwState doing Refreshing of page and how
do I accomplish this?
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can't set the password field's value when sending a response to the
browser. This is due to security restrictions, it's read-only, and loses
its value when the page is sent back to the client (hence ASP.NET cannot
save it via viewstate). But most users use a password manager of their own,
which is a client feature out of your control, that is the only (safe) way
to do it. Another way would be to use Javascript, I believe someone said
you can do that, but of course you'd pry want to be using SSL then, as the
password would be in clear text. Plus that's not really the problem,
usually it's to compare the value to the user's actual password, so you
don't want it in the page then at all for them to 'view source' on....

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
"Leon Shaw" <vn*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Why Password Textbox do not Save VeiwState doing Refreshing of page and how do I accomplish this?

Nov 17 '05 #2

P: n/a
I have a dropdownlist in my form (which is all cities after selecting a
state) that needs refreshing before submission. How do you use the password
manager client feature.
"Craig Deelsnyder" <cd******@NOSPAMyahoo.com> wrote in message
news:uO**************@TK2MSFTNGP10.phx.gbl...
You can't set the password field's value when sending a response to the
browser. This is due to security restrictions, it's read-only, and loses
its value when the page is sent back to the client (hence ASP.NET cannot
save it via viewstate). But most users use a password manager of their own, which is a client feature out of your control, that is the only (safe) way
to do it. Another way would be to use Javascript, I believe someone said
you can do that, but of course you'd pry want to be using SSL then, as the
password would be in clear text. Plus that's not really the problem,
usually it's to compare the value to the user's actual password, so you
don't want it in the page then at all for them to 'view source' on....

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
"Leon Shaw" <vn*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Why Password Textbox do not Save VeiwState doing Refreshing of page and

how
do I accomplish this?


Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.