Monday, March 26, 2012
Text in listboxs disappear...
disappears?? Like the password textbox and the File1 browse control...
Any help is appreciated.
Thanks,
Trint
.Net programmer
trintsmith@dotnet.itags.org.hotmail.com
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Trint
The password and input file values are not preserved across postbacks. Although it is not recommended because of security concerns, you could hold the values in a ViewState or Session variable and reset the values when the page is posted back
Can you please give me an example...I use vs.net and I'm a vb.net
programmer and not really good at straight asp.net.
Thanks,
Trint
.Net programmer
trintsmith@.hotmail.com
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Tuesday, March 13, 2012
TextBox and Passwords
When you set a textbox's TextMode to password, does this just stop the
password being displayed on the client machine or does it send the data to
the server encrypted.
Cheers
gwcNo it just means that it renders an HTML input tag of type password instead
of of type text, so it displays *** instead of the text you enter into it.
No encryption takes place.
"Gary Coutts" wrote:
Quote:
Originally Posted by
Hi,
>
When you set a textbox's TextMode to password, does this just stop the
password being displayed on the client machine or does it send the data to
the server encrypted.
>
>
Cheers
>
gwc
>
>
>
So does that mean that the password data is sent as plaintext back to the
server on a postback.
How do you protected against this data being snooped. As I presume to
encrypt it the data needs to be sent to the server for encryption.
"clickon" <clickon@.discussions.microsoft.comwrote in message
news:53724A74-9451-4B14-AC50-0E16034018A4@.microsoft.com...
Quote:
Originally Posted by
No it just means that it renders an HTML input tag of type password
instead
of of type text, so it displays *** instead of the text you enter into it.
No encryption takes place.
>
"Gary Coutts" wrote:
>
Quote:
Originally Posted by
>Hi,
>>
>When you set a textbox's TextMode to password, does this just stop the
>password being displayed on the client machine or does it send the data
>to
>the server encrypted.
>>
>>
>Cheers
>>
>gwc
>>
>>
>>
Hi,
Gary Coutts wrote:
Quote:
Originally Posted by
So does that mean that the password data is sent as plaintext back to the
server on a postback.
Yes, that's correct.
Quote:
Originally Posted by
How do you protected against this data being snooped. As I presume to
encrypt it the data needs to be sent to the server for encryption.
That's what SSL (HTTPS) is for.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Yes the password is sent plain text. to encrypt it you need to use SSL on
the server.
"Gary Coutts" wrote:
Quote:
Originally Posted by
So does that mean that the password data is sent as plaintext back to the
server on a postback.
>
How do you protected against this data being snooped. As I presume to
encrypt it the data needs to be sent to the server for encryption.
>
>
>
>
"clickon" <clickon@.discussions.microsoft.comwrote in message
news:53724A74-9451-4B14-AC50-0E16034018A4@.microsoft.com...
Quote:
Originally Posted by
No it just means that it renders an HTML input tag of type password
instead
of of type text, so it displays *** instead of the text you enter into it.
No encryption takes place.
"Gary Coutts" wrote:
Quote:
Originally Posted by
Hi,
>
When you set a textbox's TextMode to password, does this just stop the
password being displayed on the client machine or does it send the data
to
the server encrypted.
>
>
Cheers
>
gwc
>
>
>
>
>
>
textbox and password type input
just would like to know. when i set an ASP textbox control to be of input
type password, i can't do a "txtPassword.Text = "value"". when the page
renders the control just appears empty. why would that be? is this by
design? how would i get passed this, cause i do need to populate that box
with a value?
Thanks
JasonIt is by design, for security reasons - so that the password is not in the
HTML in plain text.
Now, you could write out javascript to set the value property of the textbox
on the client, of course this would still mean that you have the password in
plain text in the HTML.
"Jason" <c_bananas@.mighty.co.za> wrote in message
news:el9It5l6DHA.632@.TK2MSFTNGP12.phx.gbl...
> Hello!
> just would like to know. when i set an ASP textbox control to be of input
> type password, i can't do a "txtPassword.Text = "value"". when the page
> renders the control just appears empty. why would that be? is this by
> design? how would i get passed this, cause i do need to populate that box
> with a value?
> Thanks
> Jason
its by design. to set the value, use attributes.
txtPassword.Attributes["value"]="password";
-- bruce (sqlwork.com)
"Jason" <c_bananas@.mighty.co.za> wrote in message
news:el9It5l6DHA.632@.TK2MSFTNGP12.phx.gbl...
> Hello!
> just would like to know. when i set an ASP textbox control to be of input
> type password, i can't do a "txtPassword.Text = "value"". when the page
> renders the control just appears empty. why would that be? is this by
> design? how would i get passed this, cause i do need to populate that box
> with a value?
> Thanks
> Jason
Textbox and PostBack
thanks in advance
tomJudging by my tests, you can't.
It is the nature of a password textbox to never show its content on page load. (For good reason, too.)
Hum, this a absolutely normal. It's not right if you're password is displayed in the textbox after a postback. Only one personn can display, type a password : the owner. So the control has been implemented with this logic.