473,493 Members | 3,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Replace characters with * for login

I want to be able to have a user type in a password to a text box and
1.) Capture the characters entered
2.) Replace typed chars with "*"

Nov 17 '05 #1
3 1468
JPSutor,

You can set the PasswordChar property of the TextBox to whatever
character you want, in this case, '*'. The Text property will return the
string, not the password characters.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JPSutor" <jp*****@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I want to be able to have a user type in a password to a text box and
1.) Capture the characters entered
2.) Replace typed chars with "*"

Nov 17 '05 #2
Hi,

Use TextBox.PasswordChar = '*'

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"JPSutor" <jp*****@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I want to be able to have a user type in a password to a text box and
1.) Capture the characters entered
2.) Replace typed chars with "*"

Nov 17 '05 #3
Hi,

The other case was for a win app, yoi did not especified, so in any case,
if you are using a web app you use TextBox.TextMode = TextBoxMode.Password;
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"JPSutor" <jp*****@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I want to be able to have a user type in a password to a text box and
1.) Capture the characters entered
2.) Replace typed chars with "*"

Nov 17 '05 #4

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

Similar topics

2
1210
by: Florian Lindner | last post by:
Hello, I've this code: print "Login1:", login login.replace("@","_") print "Login2:", login Which produces this output: Login1: tester@root
5
2611
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char*...
4
27339
by: GregMa | last post by:
Does anyone have a good regex expression to replace any invalid filename characters in a string? Those characters are: /, \, :, *, ?, ", <, >, | I have it right now with string.replace for each...
9
9114
by: Peter Row | last post by:
Hi, I know this has been asked before, but reading the threads it is still not entirely clear. Deciding which .Replace( ) to use when. Typically if I create a string in a loop I always use a...
7
20872
by: gar | last post by:
Hi, I need to replace all the double quotes (") in a textbox with single quotes ('). I used this code text= Replace(text, """", "'" This works fine (for normal double quotes).The problem...
5
2411
by: djc | last post by:
I need to prepare a large text database field to display in an asp.net repeater control. Currently I am replacing all chr(13)'s with a "<br/>" and it works fine. However, now I also want to be able...
2
5049
by: Ola K | last post by:
Hi guys, I wrote a script that works *almost* perfectly, and this lack of perfection simply puzzles me. I simply cannot point the whys, so any help on it will be appreciated. I paste it all here,...
1
2785
by: coolami4u | last post by:
I need a program that simulates the search-and-replace operation in a text editor. The program is to have only three function calls in main. The first function prompts the user to type a string of...
7
3781
by: Grok | last post by:
I need an elegant way to remove any characters in a string if they are not in an allowed char list. The part cleaning files of the non-allowed characters will run as a service, so no forms here. ...
0
7119
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
7195
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...
1
6873
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...
0
5453
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,...
1
4889
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...
0
4579
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1400
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 ...
1
644
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.