473,748 Members | 6,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="vcPasswor d" value="<%=vcPas sword%>">
Please Help

Homa Wong
Nov 17 '05 #1
4 1738
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.Att ributes.Add("va lue", 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.goo gle.com...
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="vcPasswor d" value="<%=vcPas sword%>">
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.Att ributes.Add("va lue", 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.goo gle.com...
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="vcPasswor d" value="<%=vcPas sword%>">
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.goo gle.com...
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="vcPasswor d" value="<%=vcPas sword%>">
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.goo gle.com...
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="vcPasswor d" value="<%=vcPas sword%>">
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
3713
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 the string "Select name From users Where password = PASSWORD('$testPass')" and ran mysql_query() using the string. But nothing was returned. So I decided to run a test and try to change a password from my php page using the string
2
1601
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, username: money password: penny If type in the password as penny, it won't authenticate.
7
8695
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, somehow I always end up with error messages and functions not working right. Can someone please help me? I have a form, inside is 1 Text Field and 2 Password Fields. What I'm looking to do is: - Make sure password fields are equal - Set...
0
296
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 (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.
4
4560
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, it become problematic. In our asp.net applicaiton, I would like to keep the password in the field, if the page is posted back. Is this possible? how? Thanks
4
8274
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 leaves any field and presses the SUBMIT button, Then the edit checks are performed and if any Error occurs I show the error messge, (a postBack occured), now I loose the value of the password (what the user had entered) the password field is...
6
2369
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 changes, the textbox's value is lost. How do I prevent this? Thanks
2
2942
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 it ? Or could i create a button that save another text (replace) the cached password ? the user will be prompted to click the button to remove its cached password .... how to do it ?
4
10363
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, Miguel
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9534
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
9366
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
9316
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
9241
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
6793
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
6073
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();...
1
3303
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
2777
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.