473,594 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Singl eLine"
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 4887
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.publi c.dotnet.framew ork.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="Singl eLine"
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********@dis cussions.micros oft.comwrote in message
news:Oy******** ********@TK2MSF TNGP05.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...may be in .NET 3.0?

"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netwrote in message
news:eX******** ******@TK2MSFTN GP06.phx.gbl...
"John Kotuby" <Jo********@dis cussions.micros oft.comwrote in message
news:Oy******** ********@TK2MSF TNGP05.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...may be 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.publi c.dotnet.framew ork.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...may be in .NET 3.0?

"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netwrote in message
news:eX******** ******@TK2MSFTN GP06.phx.gbl...
"John Kotuby" <Jo********@dis cussions.micros oft.comwrote in message
news:Oy******** ********@TK2MSF TNGP05.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
656
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 password. I use a textbox with textmode password for this. But when I want to set the text of the textbox serverside
2
4641
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 <asp:dropdownlist...> is using AutoPostBack="true". When the form posts back to itself, the password textbox is cleared??? is there anyway to maintain the password during autopostback? Thanks..
4
2314
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 reader, to my password textbox, it´s empty. How can I get around this? /Marre
0
1687
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' Text='<%#DataBinder.Eval(Container.DataItem, "Password")%>' Runat='server' TextMode='Password'/> <asp:TextBox id='ConfirmPassword' Text='<%#DataBinder.Eval(Container.DataItem, "Password")%>' Runat='server' TextMode='Password'/>
2
5263
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 the Database. There is a value in my datareader but yet on my
4
5769
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". The user details are modified in making a hidden table with textboxes visible -- in response an edit command from the datagrid. One of the textboxes is used for the user's password. If this textbox has the attribute TextMode="SingleLine" (ie...
1
1876
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 Password then the Password field box is not showing the masked chars. nor display any thing. but in behind tit exist and login sucessfully. What to do to display the masked chars int he password field box.
3
4106
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 password.text = row("password")
8
6083
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 a script that did this but when I updated the page on which it resided I did not keep a copy of the javascript. If you can help me with the script and email it to me at rhumphri@silk.net I would be very grateful.
0
7880
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8255
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8010
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5739
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1486
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.