473,795 Members | 2,914 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems populating htmlinputtext control when type is set to "password"

Hi everyone,

Does anyone know if there is a problem populating a
system.web.ui.h tmlcontrols.htm linputtext control when the
control's type is set to "password?" I am attempting to
retreive a member's record from a database and populate
the control with the member's password. Unfortunately, if
the control declared on the .aspx side is as follows:

<input type="password" id="txtPassword " runat="server"/>

the control appears to be populated with the value, but
appears blank when the control is displayed in the
browser. The code in .vb code-behind is quite simple:

Protected WithEvents txtPassword as
System.Web.UI.H tmlControls.Htm lInputText

Private Sub Page_Load()
'Get value from db...
'Assign to control
txtPassword.Val ue = strPassword
End Sub

If I change the control's "type" attribute to "text", the
value is displayed correctly within the control. If anyone
has some insight into the matter, I would greatly
appreciate it.

Thanks,

Chris Barrow
Nov 17 '05 #1
2 2408
Chris,

This is by design.

If a password text box's text were set in code the password would be visible
in the view source. Obviously not secure.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Chris Barrow" <an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi everyone,

Does anyone know if there is a problem populating a
system.web.ui.h tmlcontrols.htm linputtext control when the
control's type is set to "password?" I am attempting to
retreive a member's record from a database and populate
the control with the member's password. Unfortunately, if
the control declared on the .aspx side is as follows:

<input type="password" id="txtPassword " runat="server"/>

the control appears to be populated with the value, but
appears blank when the control is displayed in the
browser. The code in .vb code-behind is quite simple:

Protected WithEvents txtPassword as
System.Web.UI.H tmlControls.Htm lInputText

Private Sub Page_Load()
'Get value from db...
'Assign to control
txtPassword.Val ue = strPassword
End Sub

If I change the control's "type" attribute to "text", the
value is displayed correctly within the control. If anyone
has some insight into the matter, I would greatly
appreciate it.

Thanks,

Chris Barrow

Nov 17 '05 #2
S.,

You're right of course. I don't know what frame of mind I
was in when I was working through the problem. Thanks for
your response.

Chris...
-----Original Message-----
Chris,

This is by design.

If a password text box's text were set in code the password would be visiblein the view source. Obviously not secure.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Chris Barrow" <an*******@disc ussions.microso ft.com> wrote in messagenews:02******* *************** ******@phx.gbl. ..
Hi everyone,

Does anyone know if there is a problem populating a
system.web.ui.h tmlcontrols.htm linputtext control when the control's type is set to "password?" I am attempting to
retreive a member's record from a database and populate
the control with the member's password. Unfortunately, if the control declared on the .aspx side is as follows:

<input type="password" id="txtPassword " runat="server"/>

the control appears to be populated with the value, but
appears blank when the control is displayed in the
browser. The code in .vb code-behind is quite simple:

Protected WithEvents txtPassword as
System.Web.UI.H tmlControls.Htm lInputText

Private Sub Page_Load()
'Get value from db...
'Assign to control
txtPassword.Val ue = strPassword
End Sub

If I change the control's "type" attribute to "text", the value is displayed correctly within the control. If anyone has some insight into the matter, I would greatly
appreciate it.

Thanks,

Chris Barrow

.

Nov 17 '05 #3

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

Similar topics

0
1851
by: yurps | last post by:
Hello, I installed both, 1st mysql 4.1.7 but heard there was a change with password hashing so now got 4.0.9 Basically when I choose a page with php_info() I can load it fine, but when I call a php page with mysql connections I get an Window NT prompt, which I type either mysql or window username/password combinations and always get "Wrong username/password" Any idea what it might be...all permission on the directory are open for...
0
2052
by: mc kim via .NET 247 | last post by:
What I am trying to is automatic bidding process in Ebay site... WebClient class can uploads form data easily. I have collected ebay url & form data to uploads.. Most of process is quite easy and simple. But ebay webserver send me your password is not valid... But the password is clearly correct.. you can type it at the result page and submit. Then you can see a message - bidding has ended and you are logged in. <- This is the message...
7
4252
by: | last post by:
I found similiar issues in MS-KB but nothing that helped me; got the Windows and Office updates from the MS website but that hasn't changed the behavior of this problem, and I don't see anything relevant in the newsgroup; help will be gratefully received. Windows 2000 system, I'm logged in with admin rights, using Office 2003. I have two databases on my local drive, in the same subdirectory. In the database HAMCHEESE, I create an...
1
10463
by: John Beard | last post by:
I downloaded the attached code from MS. It flips on the "User Cannot Change Password" on a user in AD and works great from a console or windows app, but when put into an ASP.NET app I get a "The security ID structure is invalid." error when trying to assign the new security descriptor. I am running in Windows Authentication mode with IIS set to Integrated security on an XP box. Does anyone have a work around for this? Thanks in...
2
4654
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..
2
4770
by: Ofer | last post by:
Hi, We use the ASP.net loginControls and the DB schema. How to programmatically activate the "PasswordRecovery" of a specific end-user when a user clicks my web application's button? I need to send a specific user an email with a new "reset" password. I thought of including an invisible PasswordRecovery Control and initialize the "User Name" field. PasswordRecovery1.UserName = "zako";
4
4028
by: Adrian Parker | last post by:
In asp.net, is there any way of stopping the browser from outputting the message.. "Do you want Windows to remember this password, so that you don't have to type it again the next time you visit this page" The customer doesn't want their users remembering their password as it's confidential data they're viewing, so don't want them to even have the choice. Is there something we can add to the pages to stop it asking ?
2
4409
by: btguser | last post by:
Visual Basic 6 Access 97 Windows 2000 I created a database programmatically with vb. My application is able to create and open the database with the password I set. However, when I manually doubleclick on my database to open it, I type in the same password and it says "Not a valid password". I have 4 different applications with the same code (except for queries) and 2 out of those give me that problem. Any idea as to what the problem...
3
5045
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, we've got a strange problem here: We've created an ASP.NET 2.0 web application using Membership.ValidateUser() to manually authenticate users with our website. The problem is: If the user has the "User must change password" flag set in Active Directory, ValidateUser() always returns false if that user wants to log in.
1
10167
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
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
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
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
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
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.