473,406 Members | 2,705 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,406 software developers and data experts.

Changing TextMode to Password results in empty value

Hi all,
I have a simple user-form which accepts contact and profile information for
the user to edit and save. All the textboxes are working fine and displaying
the expected data, both when the screen is first displayed and after a save
of changed data. The text boxes are being populated during the Page_Load
event.

However, when I change the TextMode property to PassWord, as I have 2
password textboxes (one for confirmation) no data shows up in them. Textmode
is the only thing being changed. The HTML source code in the browser does
not even have a value="" property displayed for the input elements with the
type="password".

In fact, for testing, I have set one password field to TextMode="SingleLine"
and the other to "PassWord". In very case the SingeLine textboxes display
the correct data and the PassWord textboxes display nothing. I have swapped
textmodes between the 2 textboxes. I have even done this test on other
textboxes besides the Passwords and the same thing happens.

Note: I have recently installed the IE Developer Toolbar. Might that have
anything to do with the strange behavior?

Does anyone have an idea of what might be happening?
Thanks for any help.
Oct 30 '07 #1
4 4873
This is normal behavior for a textbox in password mode. Otherwise,
you'd have a security issue. (View source, see password).

-----Original Message-----
From: John Kotuby [mailto:Jo********@discussions.microsoft.com]
Posted At: Tuesday, October 30, 2007 10:18 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Changing TextMode to Password results in empty value
Subject: Changing TextMode to Password results in empty value

Hi all,
I have a simple user-form which accepts contact and profile information
for
the user to edit and save. All the textboxes are working fine and
displaying
the expected data, both when the screen is first displayed and after a
save
of changed data. The text boxes are being populated during the Page_Load

event.

However, when I change the TextMode property to PassWord, as I have 2
password textboxes (one for confirmation) no data shows up in them.
Textmode
is the only thing being changed. The HTML source code in the browser
does
not even have a value="" property displayed for the input elements with
the
type="password".

In fact, for testing, I have set one password field to
TextMode="SingleLine"
and the other to "PassWord". In very case the SingeLine textboxes
display
the correct data and the PassWord textboxes display nothing. I have
swapped
textmodes between the 2 textboxes. I have even done this test on other
textboxes besides the Passwords and the same thing happens.

Note: I have recently installed the IE Developer Toolbar. Might that
have
anything to do with the strange behavior?

Does anyone have an idea of what might be happening?
Thanks for any help.
Oct 30 '07 #2
"John Kotuby" <Jo********@discussions.microsoft.comwrote in message
news:Oy****************@TK2MSFTNGP05.phx.gbl...
Note: I have recently installed the IE Developer Toolbar. Might that have
anything to do with the [strange] behavior?
No.
Does anyone have an idea of what might be happening?
It's behaving perfectly normally...

You do not pre-populate a Password box, otherwise it would be visible
through a View Source...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 30 '07 #3
Thanks guys...

I guess I was confused by the behavior of the native <input
type="password"/HTML element. It merely masks the characters with dots or
asterisks. Yes, you are correct, it also displays the password in the
on-screen source.
Originally that is what I used when I first created the page.

I later changed the input to an asp:textbox control when I decided to use a
Validation control which required a server control to reference.

I will remove the ability to edit the password from that page... a security
issue for sure. I now realize it is far better to create a stand-alone
"Change Password" screen which requires entering the original password
followed by entering the new password twice (for confirmation).

I'll bet there is even a "change password" Server control template
somewhere...maybe in .NET 3.0?

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eX**************@TK2MSFTNGP06.phx.gbl...
"John Kotuby" <Jo********@discussions.microsoft.comwrote in message
news:Oy****************@TK2MSFTNGP05.phx.gbl...
>Note: I have recently installed the IE Developer Toolbar. Might that have
anything to do with the [strange] behavior?

No.
>Does anyone have an idea of what might be happening?

It's behaving perfectly normally...

You do not pre-populate a Password box, otherwise it would be visible
through a View Source...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 30 '07 #4
" I'll bet there is even a "change password" Server control template
somewhere...maybe in .NET 3.0?"

Um... It's already in 2.0

Dave Bush
http://blog.dmbcllc.com


-----Original Message-----
From: John Kotuby [mailto:Jo********@discussions.microsoft.com]
Posted At: Tuesday, October 30, 2007 1:57 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Changing TextMode to Password results in empty value
Subject: Re: Changing TextMode to Password results in empty value

Thanks guys...

I guess I was confused by the behavior of the native <input
type="password"/HTML element. It merely masks the characters with dots
or
asterisks. Yes, you are correct, it also displays the password in the
on-screen source.
Originally that is what I used when I first created the page.

I later changed the input to an asp:textbox control when I decided to
use a
Validation control which required a server control to reference.

I will remove the ability to edit the password from that page... a
security
issue for sure. I now realize it is far better to create a stand-alone
"Change Password" screen which requires entering the original password
followed by entering the new password twice (for confirmation).

I'll bet there is even a "change password" Server control template
somewhere...maybe in .NET 3.0?

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eX**************@TK2MSFTNGP06.phx.gbl...
"John Kotuby" <Jo********@discussions.microsoft.comwrote in message
news:Oy****************@TK2MSFTNGP05.phx.gbl...
>Note: I have recently installed the IE Developer Toolbar. Might that
have
>anything to do with the [strange] behavior?

No.
>Does anyone have an idea of what might be happening?

It's behaving perfectly normally...

You do not pre-populate a Password box, otherwise it would be visible
through a View Source...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 30 '07 #5

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

Similar topics

2
by: tom | last post by:
Hello, I have an asp.net web application where I want people to register themselves. This takes them through a few pages with prev/next functionality. In one of the pages they provide a...
2
by: ChInKPoInt [No MCSD] | last post by:
1. Is there anyway to preload password? Text attribute doesn't work <asp:TextBox ID="Pass" TextMode="Password" Runat="server" Text="Hello"> 2. In the same form, if other elements such as...
4
by: MA | last post by:
Hi all! I have a problem here. I have a web page for user administration. On this page I have a textbox for password. This textbox are in TextMode password. But when I get data, via a data...
0
by: Kumar | last post by:
Hello All, I am trying the following in one of the DataGrid column. The intent is to enable users to edit their password without actually displaying it. <asp:TextBox id='Password'...
2
by: Kerri | last post by:
Hi, I have an asp textbox that allows users to enter their password. I have another page that allows a user to edit their user account. On this page I set the text to be the password in...
4
by: Jonathan Dienst | last post by:
I have a simple data access and administration page for user details on my site, including a login password -- but I cannot get the textbox to work properly if the TextMode is set to "Password". ...
1
by: Ather Ali Shaikh | last post by:
Hello I have a control TextBox with TextMode = Password fine. I am suppose to save LoginID and Password in a cookie fine. But when I read the cookie and display the key/values of the LoginID and...
3
by: William Gower | last post by:
I have a password mode field in a user record, when I go to fill the field from an existing record I see nothing in the field, when I take the textmode="password" off then I see the password ...
8
by: rhumphri | last post by:
I need a javascript that will accept the username "frederic" and the password "ozanam" on my page "member,html" that will allow those who input this data to access my page "member2.html". I had...
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: 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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.