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

setting a default password in a textbox

My system allows a user to change their email address and password.
When the user goes to the "Update Profile" page the email address can
be populated but the Password/ConfirmPassword fields can not be
popluated.

I understand the secuirty concerns for .NET not allowing to preload a
value in the text box. Is there a way of using a standard textbox
control and managing the characters when a user types (like adding
stars instead of the characters the user inputs)?

Nov 19 '05 #1
2 1180
Corey:
You can probably do something in Javascript, such as catch the OnKeyDown
event, get the actual key pressed, store it in a hidden field, cancel the
default behaviour of the event (placing the key in the textbox) and putting
a * instead.

You do know that:
<asp:TextBox id="pwd" Runat="server" TextMode="Password" value="xx" />

works, right?

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"corey s." <cs******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
My system allows a user to change their email address and password.
When the user goes to the "Update Profile" page the email address can
be populated but the Password/ConfirmPassword fields can not be
popluated.

I understand the secuirty concerns for .NET not allowing to preload a
value in the text box. Is there a way of using a standard textbox
control and managing the characters when a user types (like adding
stars instead of the characters the user inputs)?

Nov 19 '05 #2
Karl, thanks for the reply. I actually found what i needed with the
line of code below:

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

Nov 19 '05 #3

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

Similar topics

5
by: Michael Albanese | last post by:
I recently read an article that mentioned adding code to the onload event to "register a default button". The behavior i am after is that when the user hits enter, the form submits. Does...
4
by: Ian Walsh | last post by:
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...
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...
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
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...
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"...
4
by: Jeff | last post by:
hi asp.net 2.0 I have created a custom web control, here is it's header: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditUserBox.ascx.cs" Inherits="Controls_EditUserBox" %> ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.