473,378 Members | 1,500 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,378 software developers and data experts.

password field can't be preloaded

Hi,

I have a quick question.

I have a webpage allow user to modify his/her information. When I
generate the form, I want to pre-load the information to the
TextBoxes. But for the password (and confirm password) textbox, the
text can't be loaded (the TextBoxes are empty, no "dot" in them). I
checked inside Page_Load the text is loaded, but when the page is
render, the data is flushed.

I read some ASP code that in ASP this won't happen, you just do:

<input type="password" name="vcPassword" value="<%=vcPassword%>">
Please Help

Homa Wong
Nov 17 '05 #1
4 1706
You're not supposed to set the text of a password field from the server
because it's unsecure. That's why it didn't show up; it's prevented as a
security precaution. (The password would be plain text to anybody who views
the source of the page.)

However there is a workaround if you are willing to accept this risk.
Here's the simplest example I've seen:

MyPWTextBox.Attributes.Add("value", strPassWord)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Homa" <ho******@yahoo.com> wrote in message
news:a9**************************@posting.google.c om...
Hi,

I have a quick question.

I have a webpage allow user to modify his/her information. When I
generate the form, I want to pre-load the information to the
TextBoxes. But for the password (and confirm password) textbox, the
text can't be loaded (the TextBoxes are empty, no "dot" in them). I
checked inside Page_Load the text is loaded, but when the page is
render, the data is flushed.

I read some ASP code that in ASP this won't happen, you just do:

<input type="password" name="vcPassword" value="<%=vcPassword%>">
Please Help

Homa Wong

Nov 17 '05 #2
You're not supposed to set the text of a password field from the server
because it's unsecure. That's why it didn't show up; it's prevented as a
security precaution. (The password would be plain text to anybody who views
the source of the page.)

However there is a workaround if you are willing to accept this risk.
Here's the simplest example I've seen:

MyPWTextBox.Attributes.Add("value", strPassWord)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Homa" <ho******@yahoo.com> wrote in message
news:a9**************************@posting.google.c om...
Hi,

I have a quick question.

I have a webpage allow user to modify his/her information. When I
generate the form, I want to pre-load the information to the
TextBoxes. But for the password (and confirm password) textbox, the
text can't be loaded (the TextBoxes are empty, no "dot" in them). I
checked inside Page_Load the text is loaded, but when the page is
render, the data is flushed.

I read some ASP code that in ASP this won't happen, you just do:

<input type="password" name="vcPassword" value="<%=vcPassword%>">
Please Help

Homa Wong

Nov 17 '05 #3
It's a security issue. If you want your applications to be secure you should
only store hashed password values so you will never be able to know the
original password. And in any case you should not be sending passwords to
anybody, not even the original user.

Jerry

"Homa" <ho******@yahoo.com> wrote in message
news:a9**************************@posting.google.c om...
Hi,

I have a quick question.

I have a webpage allow user to modify his/her information. When I
generate the form, I want to pre-load the information to the
TextBoxes. But for the password (and confirm password) textbox, the
text can't be loaded (the TextBoxes are empty, no "dot" in them). I
checked inside Page_Load the text is loaded, but when the page is
render, the data is flushed.

I read some ASP code that in ASP this won't happen, you just do:

<input type="password" name="vcPassword" value="<%=vcPassword%>">
Please Help

Homa Wong

Nov 17 '05 #4
It's a security issue. If you want your applications to be secure you should
only store hashed password values so you will never be able to know the
original password. And in any case you should not be sending passwords to
anybody, not even the original user.

Jerry

"Homa" <ho******@yahoo.com> wrote in message
news:a9**************************@posting.google.c om...
Hi,

I have a quick question.

I have a webpage allow user to modify his/her information. When I
generate the form, I want to pre-load the information to the
TextBoxes. But for the password (and confirm password) textbox, the
text can't be loaded (the TextBoxes are empty, no "dot" in them). I
checked inside Page_Load the text is loaded, but when the page is
render, the data is flushed.

I read some ASP code that in ASP this won't happen, you just do:

<input type="password" name="vcPassword" value="<%=vcPassword%>">
Please Help

Homa Wong

Nov 17 '05 #5

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

Similar topics

11
by: John Victor | last post by:
In my mysql database, I've stored all the passwords using the PASSWORD() function. Now I'm running a test and need to compare the password in my php document to that saved in the database. I used...
2
by: Phil Latio | last post by:
I am trying something very simple, to pass the contents of a form (just username and password) to execute a query on MySQL table. The problem appears to be the password field. For example,...
7
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
0
by: Homa | last post by:
Hi, I have a quick question. I have a webpage allow user to modify his/her information. When I generate the form, I want to pre-load the information to the TextBoxes. But for the password...
4
by: feng | last post by:
For a HTTP textbox with a Type of "password", the default behaiver is that the field will be cleared out when the page is posted back. This make sense in most of the cases. But in some situation,...
4
by: J Sahoo | last post by:
Hello, I have a registration page where I am collecting user information (username, password, last name, age, etc...). I made the password field as PASSWORD (field type from the textbox). If user...
6
by: James | last post by:
Have a textbox that's in Password mode on a user creation page. Have several dropdowns that cause a PostBack out of necessity on this page. I cannot separate them. When one of these dropdowns...
2
by: moi | last post by:
Hello, i have a Asp.net V2 login page with a password to enter. In some case, a user could forget and tell IE to save its password : How to prevent it ? Is there a way to disable it ? to block...
4
by: shapper | last post by:
Hello, I am working in Asp.Net 2.0 web sites and I need to preload some images in my master pages and in the pages that use those master pages. Could someone tell me how to do this? Thanks,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...

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.