473,464 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Setting the text of a password box

I have a user details form with a textbox for a password on it
(textmode=password). I want to be able to set the text in the textbox
when retrieving user details. I will be filling the box with a dummy
value such as '*****'. When I set the .text property and the form is
run it returns as an empty value.

Is there any way around this.

Thanks.
Nov 17 '05 #1
4 1744
"Ian Walsh" <ia******@hbosplc.com> wrote in message
news:65**************************@posting.google.c om...
I have a user details form with a textbox for a password on it
(textmode=password). I want to be able to set the text in the textbox
when retrieving user details. I will be filling the box with a dummy
value such as '*****'. When I set the .text property and the form is
run it returns as an empty value.


No. This is prohibited for security reasons.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #2
Does it mean that I can do "View Source" and read password?

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
John is right that this is prohibited because of security reasons.
However there is a workaround. You must set the password text via client
side script.
Here's the simplest example I've seen:

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

This server side code outputs the needed client side code

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

"Ian Walsh" <ia******@hbosplc.com> wrote in message
news:65**************************@posting.google.c om...
I have a user details form with a textbox for a password on it
(textmode=password). I want to be able to set the text in the textbox
when retrieving user details. I will be filling the box with a dummy
value such as '*****'. When I set the .text property and the form is
run it returns as an empty value.

Is there any way around this.

Thanks.


Nov 17 '05 #3
Yup. If it's populated in the browser, and the HTML is plain text, well...

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"Ivan Demkovitch" <i@d> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
Does it mean that I can do "View Source" and read password?

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
John is right that this is prohibited because of security reasons.
However there is a workaround. You must set the password text via client side script.
Here's the simplest example I've seen:

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

This server side code outputs the needed client side code

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

"Ian Walsh" <ia******@hbosplc.com> wrote in message
news:65**************************@posting.google.c om...
I have a user details form with a textbox for a password on it
(textmode=password). I want to be able to set the text in the textbox
when retrieving user details. I will be filling the box with a dummy
value such as '*****'. When I set the .text property and the form is
run it returns as an empty value.

Is there any way around this.

Thanks.



Nov 17 '05 #4
Yes it does. That's why you've had this problem in the first place because
this kind of thing is a bad idea from a security standpoint so the default
security settings discourage it.

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

"Ivan Demkovitch" <i@d> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
Does it mean that I can do "View Source" and read password?

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
John is right that this is prohibited because of security reasons.
However there is a workaround. You must set the password text via client side script.
Here's the simplest example I've seen:

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

This server side code outputs the needed client side code

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

"Ian Walsh" <ia******@hbosplc.com> wrote in message
news:65**************************@posting.google.c om...
I have a user details form with a textbox for a password on it
(textmode=password). I want to be able to set the text in the textbox
when retrieving user details. I will be filling the box with a dummy
value such as '*****'. When I set the .text property and the form is
run it returns as an empty value.

Is there any way around this.

Thanks.



Nov 17 '05 #5

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

Similar topics

16
by: John | last post by:
Hello. If I want to set up my first database and start using it in Dreamweaver what do I need to do? The book I'm working on has a CD with the database on. It is telling me to put it in the...
2
by: John | last post by:
Hi all, I thought that this would be very basic. Basically, I have a textbox set at type password. When I try to set the value of this textbox at runtime the text field does not get populated. I...
4
by: David Kyle | last post by:
Hello there, I'm having some problems setting the TextBox.Text Property in my code and having it returned to the client in the source when the TextBox.TextMode="Password". I know this is...
6
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have...
3
by: Brian Henry | last post by:
Hi, I have a bunch of forms in a DLL that I call from my main application. The one form is a login form, and I have the tab order set in the order I want it (password box first, then ok button...
4
by: r_burgess | last post by:
TheNewUser.Invoke("SetPassword", New Object() {"123"}) Does anyone have any idea why that call wouldn't work, even though I have supplied credentials which are fully capable of setting and...
3
by: Martin | last post by:
How does one set up basic authentication on an HttpListener? I know I need to set the HttpListener.AuthenticationSchemes to AuthenticationSchemes.Basic but then I'm unsure how and against what...
10
by: Sridhar | last post by:
HI, I am having problems setting up a website so that it will be available only inside the domain. We have three servers. One is iis server and second one is internal server and the third one is...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
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
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,...
0
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...
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
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
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,...
0
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...
0
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 ...

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.